<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
           "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<title>Coverage Report</title>
<link title="Style" type="text/css" rel="stylesheet" href="css/main.css"/>
<script type="text/javascript" src="js/popup.js"></script>
</head>
<body>
<h5>Coverage Report - org.jsimpledb.core.Transaction</h5>
<div class="separator">&nbsp;</div>
<table class="report">
<thead><tr>  <td class="heading">Classes in this File</td>  <td class="heading"><a class="dfn" href="help.html" onclick="popupwindow('help.html'); return false;">Line Coverage</a></td>  <td class="heading"><a class="dfn" href="help.html" onclick="popupwindow('help.html'); return false;">Branch Coverage</a></td>  <td class="heading"><a class="dfn" href="help.html" onclick="popupwindow('help.html'); return false;">Complexity</a></td></tr></thead>
  <tr><td><a href="org.jsimpledb.core.Transaction.html">Transaction</a></td><td><table cellpadding="0px" cellspacing="0px" class="percentgraph"><tr class="percentgraph"><td align="right" class="percentgraph" width="40">0%</td><td class="percentgraph"><div class="percentgraph"><div class="greenbar" style="width:0px"><span class="text">0/833</span></div></div></td></tr></table></td><td><table cellpadding="0px" cellspacing="0px" class="percentgraph"><tr class="percentgraph"><td align="right" class="percentgraph" width="40">0%</td><td class="percentgraph"><div class="percentgraph"><div class="greenbar" style="width:0px"><span class="text">0/564</span></div></div></td></tr></table></td><td class="value"><span class="hidden">4.5225225225225225;</span>4.523</td></tr>
  <tr><td><a href="org.jsimpledb.core.Transaction.html">Transaction$1</a></td><td><table cellpadding="0px" cellspacing="0px" class="percentgraph"><tr class="percentgraph"><td align="right" class="percentgraph" width="40">0%</td><td class="percentgraph"><div class="percentgraph"><div class="greenbar" style="width:0px"><span class="text">0/2</span></div></div></td></tr></table></td><td><table cellpadding="0px" cellspacing="0px" class="percentgraph"><tr class="percentgraph"><td align="right" class="percentgraph" width="40"><a class="dfn" href="help.html" onclick="popupwindow('help.html'); return false;">N/A</a></td><td class="percentgraph"><div class="percentgraph"><div class="na" style="width:100px"><span class="text"><a class="dfn" href="help.html" onclick="popupwindow('help.html'); return false;">N/A</a></span></div></div></td></tr></table></td><td class="value"><span class="hidden">4.5225225225225225;</span>4.523</td></tr>
  <tr><td><a href="org.jsimpledb.core.Transaction.html">Transaction$2</a></td><td><table cellpadding="0px" cellspacing="0px" class="percentgraph"><tr class="percentgraph"><td align="right" class="percentgraph" width="40">0%</td><td class="percentgraph"><div class="percentgraph"><div class="greenbar" style="width:0px"><span class="text">0/3</span></div></div></td></tr></table></td><td><table cellpadding="0px" cellspacing="0px" class="percentgraph"><tr class="percentgraph"><td align="right" class="percentgraph" width="40"><a class="dfn" href="help.html" onclick="popupwindow('help.html'); return false;">N/A</a></td><td class="percentgraph"><div class="percentgraph"><div class="na" style="width:100px"><span class="text"><a class="dfn" href="help.html" onclick="popupwindow('help.html'); return false;">N/A</a></span></div></div></td></tr></table></td><td class="value"><span class="hidden">4.5225225225225225;</span>4.523</td></tr>
  <tr><td><a href="org.jsimpledb.core.Transaction.html">Transaction$3</a></td><td><table cellpadding="0px" cellspacing="0px" class="percentgraph"><tr class="percentgraph"><td align="right" class="percentgraph" width="40">0%</td><td class="percentgraph"><div class="percentgraph"><div class="greenbar" style="width:0px"><span class="text">0/3</span></div></div></td></tr></table></td><td><table cellpadding="0px" cellspacing="0px" class="percentgraph"><tr class="percentgraph"><td align="right" class="percentgraph" width="40"><a class="dfn" href="help.html" onclick="popupwindow('help.html'); return false;">N/A</a></td><td class="percentgraph"><div class="percentgraph"><div class="na" style="width:100px"><span class="text"><a class="dfn" href="help.html" onclick="popupwindow('help.html'); return false;">N/A</a></span></div></div></td></tr></table></td><td class="value"><span class="hidden">4.5225225225225225;</span>4.523</td></tr>
  <tr><td><a href="org.jsimpledb.core.Transaction.html">Transaction$4</a></td><td><table cellpadding="0px" cellspacing="0px" class="percentgraph"><tr class="percentgraph"><td align="right" class="percentgraph" width="40">0%</td><td class="percentgraph"><div class="percentgraph"><div class="greenbar" style="width:0px"><span class="text">0/3</span></div></div></td></tr></table></td><td><table cellpadding="0px" cellspacing="0px" class="percentgraph"><tr class="percentgraph"><td align="right" class="percentgraph" width="40"><a class="dfn" href="help.html" onclick="popupwindow('help.html'); return false;">N/A</a></td><td class="percentgraph"><div class="percentgraph"><div class="na" style="width:100px"><span class="text"><a class="dfn" href="help.html" onclick="popupwindow('help.html'); return false;">N/A</a></span></div></div></td></tr></table></td><td class="value"><span class="hidden">4.5225225225225225;</span>4.523</td></tr>
  <tr><td><a href="org.jsimpledb.core.Transaction.html">Transaction$5</a></td><td><table cellpadding="0px" cellspacing="0px" class="percentgraph"><tr class="percentgraph"><td align="right" class="percentgraph" width="40">0%</td><td class="percentgraph"><div class="percentgraph"><div class="greenbar" style="width:0px"><span class="text">0/3</span></div></div></td></tr></table></td><td><table cellpadding="0px" cellspacing="0px" class="percentgraph"><tr class="percentgraph"><td align="right" class="percentgraph" width="40"><a class="dfn" href="help.html" onclick="popupwindow('help.html'); return false;">N/A</a></td><td class="percentgraph"><div class="percentgraph"><div class="na" style="width:100px"><span class="text"><a class="dfn" href="help.html" onclick="popupwindow('help.html'); return false;">N/A</a></span></div></div></td></tr></table></td><td class="value"><span class="hidden">4.5225225225225225;</span>4.523</td></tr>
  <tr><td><a href="org.jsimpledb.core.Transaction.html">Transaction$Callback</a></td><td><table cellpadding="0px" cellspacing="0px" class="percentgraph"><tr class="percentgraph"><td align="right" class="percentgraph" width="40"><a class="dfn" href="help.html" onclick="popupwindow('help.html'); return false;">N/A</a></td><td class="percentgraph"><div class="percentgraph"><div class="na" style="width:100px"><span class="text"><a class="dfn" href="help.html" onclick="popupwindow('help.html'); return false;">N/A</a></span></div></div></td></tr></table></td><td><table cellpadding="0px" cellspacing="0px" class="percentgraph"><tr class="percentgraph"><td align="right" class="percentgraph" width="40"><a class="dfn" href="help.html" onclick="popupwindow('help.html'); return false;">N/A</a></td><td class="percentgraph"><div class="percentgraph"><div class="na" style="width:100px"><span class="text"><a class="dfn" href="help.html" onclick="popupwindow('help.html'); return false;">N/A</a></span></div></div></td></tr></table></td><td class="value"><span class="hidden">4.5225225225225225;</span>4.523</td></tr>
  <tr><td><a href="org.jsimpledb.core.Transaction.html">Transaction$CallbackAdapter</a></td><td><table cellpadding="0px" cellspacing="0px" class="percentgraph"><tr class="percentgraph"><td align="right" class="percentgraph" width="40">0%</td><td class="percentgraph"><div class="percentgraph"><div class="greenbar" style="width:0px"><span class="text">0/5</span></div></div></td></tr></table></td><td><table cellpadding="0px" cellspacing="0px" class="percentgraph"><tr class="percentgraph"><td align="right" class="percentgraph" width="40"><a class="dfn" href="help.html" onclick="popupwindow('help.html'); return false;">N/A</a></td><td class="percentgraph"><div class="percentgraph"><div class="na" style="width:100px"><span class="text"><a class="dfn" href="help.html" onclick="popupwindow('help.html'); return false;">N/A</a></span></div></div></td></tr></table></td><td class="value"><span class="hidden">4.5225225225225225;</span>4.523</td></tr>
  <tr><td><a href="org.jsimpledb.core.Transaction.html">Transaction$HasCascadeDelete</a></td><td><table cellpadding="0px" cellspacing="0px" class="percentgraph"><tr class="percentgraph"><td align="right" class="percentgraph" width="40">0%</td><td class="percentgraph"><div class="percentgraph"><div class="greenbar" style="width:0px"><span class="text">0/2</span></div></div></td></tr></table></td><td><table cellpadding="0px" cellspacing="0px" class="percentgraph"><tr class="percentgraph"><td align="right" class="percentgraph" width="40"><a class="dfn" href="help.html" onclick="popupwindow('help.html'); return false;">N/A</a></td><td class="percentgraph"><div class="percentgraph"><div class="na" style="width:100px"><span class="text"><a class="dfn" href="help.html" onclick="popupwindow('help.html'); return false;">N/A</a></span></div></div></td></tr></table></td><td class="value"><span class="hidden">4.5225225225225225;</span>4.523</td></tr>
  <tr><td><a href="org.jsimpledb.core.Transaction.html">Transaction$MonitoredPredicate</a></td><td><table cellpadding="0px" cellspacing="0px" class="percentgraph"><tr class="percentgraph"><td align="right" class="percentgraph" width="40">0%</td><td class="percentgraph"><div class="percentgraph"><div class="greenbar" style="width:0px"><span class="text">0/6</span></div></div></td></tr></table></td><td><table cellpadding="0px" cellspacing="0px" class="percentgraph"><tr class="percentgraph"><td align="right" class="percentgraph" width="40">0%</td><td class="percentgraph"><div class="percentgraph"><div class="greenbar" style="width:0px"><span class="text">0/6</span></div></div></td></tr></table></td><td class="value"><span class="hidden">4.5225225225225225;</span>4.523</td></tr>
  <tr><td><a href="org.jsimpledb.core.Transaction.html">Transaction$Mutation</a></td><td><table cellpadding="0px" cellspacing="0px" class="percentgraph"><tr class="percentgraph"><td align="right" class="percentgraph" width="40"><a class="dfn" href="help.html" onclick="popupwindow('help.html'); return false;">N/A</a></td><td class="percentgraph"><div class="percentgraph"><div class="na" style="width:100px"><span class="text"><a class="dfn" href="help.html" onclick="popupwindow('help.html'); return false;">N/A</a></span></div></div></td></tr></table></td><td><table cellpadding="0px" cellspacing="0px" class="percentgraph"><tr class="percentgraph"><td align="right" class="percentgraph" width="40"><a class="dfn" href="help.html" onclick="popupwindow('help.html'); return false;">N/A</a></td><td class="percentgraph"><div class="percentgraph"><div class="na" style="width:100px"><span class="text"><a class="dfn" href="help.html" onclick="popupwindow('help.html'); return false;">N/A</a></span></div></div></td></tr></table></td><td class="value"><span class="hidden">4.5225225225225225;</span>4.523</td></tr>
  <tr><td><a href="org.jsimpledb.core.Transaction.html">Transaction$SimpleFieldChangeNotifier</a></td><td><table cellpadding="0px" cellspacing="0px" class="percentgraph"><tr class="percentgraph"><td align="right" class="percentgraph" width="40">0%</td><td class="percentgraph"><div class="percentgraph"><div class="greenbar" style="width:0px"><span class="text">0/8</span></div></div></td></tr></table></td><td><table cellpadding="0px" cellspacing="0px" class="percentgraph"><tr class="percentgraph"><td align="right" class="percentgraph" width="40"><a class="dfn" href="help.html" onclick="popupwindow('help.html'); return false;">N/A</a></td><td class="percentgraph"><div class="percentgraph"><div class="na" style="width:100px"><span class="text"><a class="dfn" href="help.html" onclick="popupwindow('help.html'); return false;">N/A</a></span></div></div></td></tr></table></td><td class="value"><span class="hidden">4.5225225225225225;</span>4.523</td></tr>

</table>
<div class="separator">&nbsp;</div>
<table cellspacing="0" cellpadding="0" class="src">
<tr>  <td class="numLine">&nbsp;1</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;2</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">/*</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;3</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment"> * Copyright (C) 2014 Archie L. Cobbs. All rights reserved.</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;4</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment"> *</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;5</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment"> * $Id: org.jsimpledb.core.Transaction.html 939 2015-05-29 01:16:17Z archie.cobbs $</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;6</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment"> */</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;7</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;8</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="keyword">package</span> org.jsimpledb.core;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;9</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;10</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="keyword">import</span> com.google.common.base.Predicate;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;11</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="keyword">import</span> com.google.common.collect.Iterables;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;12</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="keyword">import</span> com.google.common.collect.Maps;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;13</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;14</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="keyword">import</span> java.util.ArrayList;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;15</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="keyword">import</span> java.util.Arrays;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;16</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="keyword">import</span> java.util.Collections;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;17</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="keyword">import</span> java.util.HashMap;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;18</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="keyword">import</span> java.util.HashSet;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;19</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="keyword">import</span> java.util.Iterator;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;20</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="keyword">import</span> java.util.LinkedHashSet;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;21</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="keyword">import</span> java.util.List;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;22</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="keyword">import</span> java.util.Map;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;23</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="keyword">import</span> java.util.NavigableMap;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;24</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="keyword">import</span> java.util.NavigableSet;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;25</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="keyword">import</span> java.util.SortedSet;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;26</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="keyword">import</span> java.util.TreeMap;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;27</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="keyword">import</span> java.util.TreeSet;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;28</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;29</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="keyword">import</span> org.jsimpledb.kv.KVPair;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;30</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="keyword">import</span> org.jsimpledb.kv.KVTransaction;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;31</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="keyword">import</span> org.jsimpledb.kv.KVTransactionException;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;32</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="keyword">import</span> org.jsimpledb.kv.KeyRanges;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;33</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="keyword">import</span> org.jsimpledb.util.ByteReader;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;34</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="keyword">import</span> org.jsimpledb.util.ByteUtil;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;35</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="keyword">import</span> org.jsimpledb.util.ByteWriter;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;36</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="keyword">import</span> org.jsimpledb.util.NavigableSets;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;37</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="keyword">import</span> org.jsimpledb.util.ObjIdSet;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;38</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="keyword">import</span> org.jsimpledb.util.UnsignedIntEncoder;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;39</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="keyword">import</span> org.slf4j.Logger;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;40</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="keyword">import</span> org.slf4j.LoggerFactory;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;41</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;42</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">/**</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;43</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment"> * A JSimpleDB {@link Database} transaction.</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;44</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment"> *</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;45</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment"> * &lt;p&gt;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;46</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment"> * Note: this is the lower level, core API for {@link org.jsimpledb.JSimpleDB}. In most cases this API</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;47</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment"> * will only be used indirectly through the higher level {@link org.jsimpledb.JSimpleDB}, {@link org.jsimpledb.JTransaction},</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;48</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment"> * and {@link org.jsimpledb.JObject} APIs.</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;49</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment"> * &lt;/p&gt;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;50</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment"> *</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;51</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment"> * &lt;p&gt;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;52</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment"> * Methods in this class can be divided into the following categories:</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;53</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment"> * &lt;/p&gt;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;54</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment"> *</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;55</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment"> * &lt;p&gt;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;56</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment"> * &lt;b&gt;Transaction Meta-Data&lt;/b&gt;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;57</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment"> * &lt;ul&gt;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;58</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment"> *  &lt;li&gt;{@link #getDatabase getDatabase()} - Get the associated {@link Database}&lt;/li&gt;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;59</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment"> *  &lt;li&gt;{@link #getSchemas getSchemas()} - Get the database {@link Schemas}, as seen by this transaction&lt;/li&gt;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;60</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment"> *  &lt;li&gt;{@link #getSchema() getSchema()} - Get the {@link Schema} that will be used by this transaction&lt;/li&gt;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;61</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment"> *  &lt;li&gt;{@link #deleteSchemaVersion deleteSchemaVersion()} - Delete a schema version that is no longer being used&lt;/li&gt;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;62</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment"> * &lt;/ul&gt;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;63</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment"> *</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;64</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment"> * &lt;p&gt;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;65</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment"> * &lt;b&gt;Transaction Lifecycle&lt;/b&gt;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;66</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment"> * &lt;ul&gt;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;67</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment"> *  &lt;li&gt;{@link #commit commit()} - Commit transaction&lt;/li&gt;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;68</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment"> *  &lt;li&gt;{@link #rollback rollback()} - Roll back transaction&lt;/li&gt;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;69</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment"> *  &lt;li&gt;{@link #isValid isValid()} - Test transaction validity&lt;/li&gt;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;70</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment"> *  &lt;li&gt;{@link #setTimeout setTimeout()} - Set transaction timeout&lt;/li&gt;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;71</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment"> *  &lt;li&gt;{@link #setReadOnly setReadOnly()} - Set transaction to read-only&lt;/li&gt;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;72</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment"> *  &lt;li&gt;{@link #setRollbackOnly setRollbackOnly()} - Set transaction for rollack only&lt;/li&gt;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;73</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment"> *  &lt;li&gt;{@link #addCallback addCallback()} - Register a {@link Callback} on transaction completion&lt;/li&gt;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;74</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment"> *  &lt;li&gt;{@link #createSnapshotTransaction createSnapshotTransaction()} - Create a empty, in-memory copy of this transaction&lt;/li&gt;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;75</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment"> * &lt;/ul&gt;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;76</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment"> *</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;77</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment"> * &lt;p&gt;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;78</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment"> * &lt;b&gt;Object Lifecycle&lt;/b&gt;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;79</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment"> * &lt;ul&gt;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;80</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment"> *  &lt;li&gt;{@link #create(int) create()} - Create a database object&lt;/li&gt;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;81</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment"> *  &lt;li&gt;{@link #delete delete()} - Delete a database object&lt;/li&gt;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;82</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment"> *  &lt;li&gt;{@link #exists exists()} - Test whether a database object exists&lt;/li&gt;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;83</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment"> *  &lt;li&gt;{@link #copy copy()} - Copy an object's fields onto another object in a (possibly) different transaction&lt;/li&gt;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;84</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment"> *  &lt;li&gt;{@link #addCreateListener addCreateListener()} - Register a {@link CreateListener} for notifications about new objects&lt;/li&gt;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;85</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment"> *  &lt;li&gt;{@link #removeCreateListener removeCreateListener()} - Unregister a {@link CreateListener}&lt;/li&gt;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;86</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment"> *  &lt;li&gt;{@link #addDeleteListener addDeleteListener()} - Register a {@link DeleteListener} for notifications</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;87</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment"> *      about object deletions&lt;/li&gt;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;88</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment"> *  &lt;li&gt;{@link #removeDeleteListener removeDeleteListener()} - Unregister a {@link DeleteListener}&lt;/li&gt;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;89</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment"> * &lt;/ul&gt;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;90</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment"> *</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;91</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment"> * &lt;p&gt;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;92</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment"> * &lt;b&gt;Object Versioning&lt;/b&gt;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;93</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment"> * &lt;ul&gt;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;94</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment"> *  &lt;li&gt;{@link #getSchemaVersion(ObjId) getSchemaVersion()} - Inspect an object's schema version&lt;/li&gt;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;95</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment"> *  &lt;li&gt;{@link #updateSchemaVersion updateSchemaVersion()} - Update an object's schema version to match this transaction&lt;/li&gt;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;96</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment"> *  &lt;li&gt;{@link #queryVersion queryVersion()} - Locate objects by schema version&lt;/li&gt;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;97</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment"> *  &lt;li&gt;{@link #addVersionChangeListener addVersionChangeListener()} - Register a {@link VersionChangeListener}</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;98</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment"> *      for notifications about object version changes&lt;/li&gt;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;99</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment"> *  &lt;li&gt;{@link #removeVersionChangeListener removeVersionChangeListener()} - Unregister a {@link VersionChangeListener}&lt;/li&gt;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;100</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment"> * &lt;/ul&gt;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;101</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment"> *</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;102</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment"> * &lt;p&gt;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;103</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment"> * &lt;b&gt;Object and Field Access&lt;/b&gt;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;104</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment"> * &lt;ul&gt;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;105</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment"> *  &lt;li&gt;{@link #getAll getAll(int)} - Get all objects, or all objects of a specific type&lt;/li&gt;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;106</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment"> *  &lt;li&gt;{@link #readSimpleField readSimpleField()} - Read the value of a {@link SimpleField} in an object&lt;/li&gt;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;107</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment"> *  &lt;li&gt;{@link #writeSimpleField writeSimpleField()} - Write the value of a {@link SimpleField} in an object&lt;/li&gt;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;108</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment"> *  &lt;li&gt;{@link #readCounterField readCounterField()} - Read the value of a {@link CounterField} in an object&lt;/li&gt;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;109</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment"> *  &lt;li&gt;{@link #writeCounterField writeCounterField()} - Write the value of a {@link CounterField} in an object&lt;/li&gt;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;110</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment"> *  &lt;li&gt;{@link #adjustCounterField adjustCounterField()} - Adjust the value of a {@link CounterField} in an object&lt;/li&gt;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;111</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment"> *  &lt;li&gt;{@link #readSetField readSetField()} - Access a {@link SetField} in an object as a {@link NavigableSet}&lt;/li&gt;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;112</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment"> *  &lt;li&gt;{@link #readListField readListField()} - Access a {@link ListField} in an object as a {@link List}&lt;/li&gt;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;113</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment"> *  &lt;li&gt;{@link #readMapField readMapField()} - Access a {@link MapField} in an object as a {@link NavigableMap}&lt;/li&gt;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;114</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment"> *  &lt;li&gt;{@link #getKey getKey(ObjId)} - Get the {@link org.jsimpledb.kv.KVDatabase} key corresponding to an object&lt;/li&gt;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;115</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment"> *  &lt;li&gt;{@link #getKey getKey(ObjId, int)} - Get the {@link org.jsimpledb.kv.KVDatabase}</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;116</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment"> *      key corresponding to a field in an object&lt;/li&gt;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;117</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment"> * &lt;/ul&gt;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;118</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment"> *</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;119</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment"> * &lt;p&gt;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;120</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment"> * &lt;b&gt;Field Change Notifications&lt;/b&gt;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;121</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment"> * &lt;ul&gt;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;122</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment"> *  &lt;li&gt;{@link #addSimpleFieldChangeListener addSimpleFieldChangeListener()} - Register a {@link SimpleFieldChangeListener} for</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;123</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment"> *      notifications of changes in a {@link SimpleField}, as seen through a path of object references&lt;/li&gt;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;124</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment"> *  &lt;li&gt;{@link #addSetFieldChangeListener addSetFieldChangeListener()} - Register a {@link SetFieldChangeListener} for</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;125</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment"> *      notifications of changes in a {@link SetField}, as seen through a path of object references&lt;/li&gt;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;126</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment"> *  &lt;li&gt;{@link #addListFieldChangeListener addListFieldChangeListener()} - Register a {@link ListFieldChangeListener} for</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;127</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment"> *      notifications of changes in a {@link ListField}, as seen through a path of object references&lt;/li&gt;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;128</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment"> *  &lt;li&gt;{@link #addMapFieldChangeListener addMapFieldChangeListener()} - Register a {@link MapFieldChangeListener} for</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;129</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment"> *      notifications of changes in a {@link MapField}, as seen through a path of object references&lt;/li&gt;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;130</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment"> *  &lt;li&gt;{@link #removeSimpleFieldChangeListener removeSimpleFieldChangeListener()} - Unregister a previously registered</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;131</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment"> *      {@link SimpleFieldChangeListener}&lt;/li&gt;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;132</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment"> *  &lt;li&gt;{@link #removeSetFieldChangeListener removeSetFieldChangeListener()} - Unregister a previously registered</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;133</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment"> *      {@link SetFieldChangeListener}&lt;/li&gt;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;134</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment"> *  &lt;li&gt;{@link #removeListFieldChangeListener removeListFieldChangeListener()} - Unregister a previously registered</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;135</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment"> *      {@link ListFieldChangeListener}&lt;/li&gt;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;136</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment"> *  &lt;li&gt;{@link #removeMapFieldChangeListener removeMapFieldChangeListener()} - Unregister a previously registered</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;137</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment"> *      {@link MapFieldChangeListener}&lt;/li&gt;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;138</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment"> * &lt;/ul&gt;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;139</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment"> *</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;140</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment"> * &lt;p&gt;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;141</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment"> * &lt;b&gt;Reference Inversion&lt;/b&gt;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;142</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment"> * &lt;ul&gt;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;143</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment"> *  &lt;li&gt;{@link #invertReferencePath invertReferencePath()} - Find all objects that refer to any element in a given set</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;144</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment"> *      of objects through a specified reference path&lt;/li&gt;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;145</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment"> * &lt;/ul&gt;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;146</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment"> *</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;147</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment"> * &lt;p&gt;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;148</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment"> * &lt;b&gt;Index Queries&lt;/b&gt;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;149</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment"> * &lt;ul&gt;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;150</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment"> *  &lt;li&gt;{@link #queryIndex queryIndex()} - Query the index associated with a {@link SimpleField}</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;151</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment"> *      to identify all values and all objects having those values&lt;/li&gt;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;152</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment"> *  &lt;li&gt;{@link #queryListElementIndex queryListElementIndex()} - Query the index associated with a {@link ListField}</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;153</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment"> *      to identify all list elements, all objects having those elements in the list, and thier corresponding indicies&lt;/li&gt;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;154</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment"> *  &lt;li&gt;{@link #queryMapValueIndex queryMapValueIndex()} - Query the index associated with a {@link MapField}</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;155</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment"> *      to identify all map values, all objects having those values in the map, and the corresponding keys&lt;/li&gt;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;156</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment"> *  &lt;li&gt;{@link #queryCompositeIndex queryCompositeIndex()} - Query any composite index&lt;/li&gt;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;157</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment"> *  &lt;li&gt;{@link #queryCompositeIndex2 queryCompositeIndex2()} - Query a composite index on two fields&lt;/li&gt;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;158</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment"> *  &lt;li&gt;{@link #queryCompositeIndex3 queryCompositeIndex3()} - Query a composite index on three fields&lt;/li&gt;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;159</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment"> *  &lt;li&gt;{@link #queryCompositeIndex3 queryCompositeIndex4()} - Query a composite index on four fields&lt;/li&gt;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;160</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment"> *  &lt;!-- COMPOSITE-INDEX --&gt;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;161</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment"> * &lt;/ul&gt;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;162</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment"> *</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;163</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment"> * &lt;p&gt;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;164</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment"> * All methods returning a set of values return a {@link NavigableSet}.</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;165</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment"> * The {@link NavigableSets} utility class provides methods for the efficient {@link NavigableSets#intersection intersection},</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;166</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment"> * {@link NavigableSets#union union}, {@link NavigableSets#difference difference}, and</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;167</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment"> * {@link NavigableSets#symmetricDifference symmetric difference} of {@link NavigableSet}s containing the same element type,</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;168</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment"> * thereby providing the equivalent of traditional database joins.</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;169</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment"> * &lt;/p&gt;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;170</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment"> */</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;171</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;<span class="keyword">public</span> <span class="keyword">class</span> Transaction {</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;172</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;173</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="keyword">private</span> <span class="keyword">static</span> <span class="keyword">final</span> <span class="keyword">int</span> MAX_GENERATED_KEY_ATTEMPTS = 1000;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;174</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;175</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;    <span class="keyword">protected</span> <span class="keyword">final</span> Logger log = LoggerFactory.getLogger(<span class="keyword">this</span>.getClass());</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;176</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;177</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="keyword">final</span> Database db;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;178</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="keyword">final</span> KVTransaction kvt;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;179</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="keyword">final</span> Schemas schemas;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;180</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="keyword">final</span> Schema schema;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;181</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;182</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="keyword">boolean</span> stale;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;183</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="keyword">boolean</span> readOnly;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;184</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="keyword">boolean</span> rollbackOnly;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;185</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;186</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;    <span class="keyword">private</span> <span class="keyword">final</span> ThreadLocal&lt;TreeMap&lt;Integer, ArrayList&lt;FieldChangeNotifier&gt;&gt;&gt; pendingNotifications = <span class="keyword">new</span> ThreadLocal&lt;&gt;();</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;187</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;    <span class="keyword">private</span> <span class="keyword">final</span> HashSet&lt;VersionChangeListener&gt; versionChangeListeners = <span class="keyword">new</span> HashSet&lt;&gt;();</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;188</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;    <span class="keyword">private</span> <span class="keyword">final</span> HashSet&lt;CreateListener&gt; createListeners = <span class="keyword">new</span> HashSet&lt;&gt;();</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;189</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;    <span class="keyword">private</span> <span class="keyword">final</span> HashSet&lt;DeleteListener&gt; deleteListeners = <span class="keyword">new</span> HashSet&lt;&gt;();</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;190</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;    <span class="keyword">private</span> <span class="keyword">final</span> TreeMap&lt;Integer, HashSet&lt;FieldMonitor&gt;&gt; monitorMap = <span class="keyword">new</span> TreeMap&lt;&gt;();</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;191</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;    <span class="keyword">private</span> <span class="keyword">final</span> LinkedHashSet&lt;Callback&gt; callbacks = <span class="keyword">new</span> LinkedHashSet&lt;&gt;();</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;192</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;193</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    Transaction(Database db, KVTransaction kvt, Schemas schemas, <span class="keyword">int</span> versionNumber) {</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;194</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;        <span class="keyword">this</span>(db, kvt, schemas, schemas.getVersion(versionNumber));</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;195</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;    }</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;196</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;197</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;    Transaction(Database db, KVTransaction kvt, Schemas schemas, Schema schema) {</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;198</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;        <span class="keyword">this</span>.db = db;</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;199</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;        <span class="keyword">this</span>.kvt = kvt;</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;200</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;        <span class="keyword">this</span>.schemas = schemas;</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;201</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;        <span class="keyword">this</span>.schema = schema;</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;202</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;    }</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;203</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;204</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">// Transaction Meta-Data</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;205</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;206</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="comment">/**</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;207</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * Get the database with which this transaction is associated.</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;208</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;209</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @return associated database</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;210</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     */</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;211</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="keyword">public</span> Database getDatabase() {</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;212</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;        <span class="keyword">return</span> <span class="keyword">this</span>.db;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;213</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    }</pre></td></tr>
<tr>  <td class="numLine">&nbsp;214</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;215</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="comment">/**</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;216</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * Get the database schema versions known to this transaction.</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;217</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * This reflects all schema versions currently recorded in the database.</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;218</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;219</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @return associated schemas</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;220</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     */</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;221</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="keyword">public</span> Schemas getSchemas() {</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;222</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;        <span class="keyword">return</span> <span class="keyword">this</span>.schemas;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;223</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    }</pre></td></tr>
<tr>  <td class="numLine">&nbsp;224</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;225</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="comment">/**</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;226</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * Get the database schema version associated with this transaction.</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;227</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * This is the schema version used for newly created objects, and the target schema version when</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;228</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * {@linkplain #updateSchemaVersion upgrading} objects.</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;229</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;230</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @return associated schema</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;231</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     */</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;232</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="keyword">public</span> Schema getSchema() {</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;233</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;        <span class="keyword">return</span> <span class="keyword">this</span>.schema;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;234</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    }</pre></td></tr>
<tr>  <td class="numLine">&nbsp;235</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;236</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="comment">/**</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;237</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * Delete a schema version that is no longer being used. There must be no objects with the given version</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;238</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * in the database, and {@code version} must not be the version being used by this transaction.</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;239</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;240</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @param version schema version to remove</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;241</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @return true if schema version was found and removed, false if schema version does not exist in database</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;242</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @throws InvalidSchemaException if one or more objects with schema version {@code version} still exist</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;243</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @throws InvalidSchemaException if {@code version} is equal to this transaction's version</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;244</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @throws IllegalArgumentException if {@code version} is zero or negative</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;245</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @throws StaleTransactionException if this transaction is no longer usable</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;246</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     */</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;247</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="keyword">public</span> <span class="keyword">synchronized</span> <span class="keyword">boolean</span> deleteSchemaVersion(<span class="keyword">int</span> version) {</pre></td></tr>
<tr>  <td class="numLine">&nbsp;248</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;249</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        <span class="comment">// Sanity check</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;250</td>  <td class="nbHitsUncovered"><a title="Line 250: Conditional coverage 0% (0/2).">&nbsp;0</a></td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;<a title="Line 250: Conditional coverage 0% (0/2).">        <span class="keyword">if</span> (version &lt;= 0)</a></span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;251</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;            <span class="keyword">throw</span> <span class="keyword">new</span> IllegalArgumentException(<span class="string">"invalid schema version "</span> + version);</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;252</td>  <td class="nbHitsUncovered"><a title="Line 252: Conditional coverage 0% (0/2).">&nbsp;0</a></td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;<a title="Line 252: Conditional coverage 0% (0/2).">        <span class="keyword">if</span> (version == <span class="keyword">this</span>.schema.getVersionNumber())</a></span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;253</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;            <span class="keyword">throw</span> <span class="keyword">new</span> InvalidSchemaException(<span class="string">"version "</span> + version + <span class="string">" is this transaction's version"</span>);</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;254</td>  <td class="nbHitsUncovered"><a title="Line 254: Conditional coverage 0% (0/2).">&nbsp;0</a></td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;<a title="Line 254: Conditional coverage 0% (0/2).">        <span class="keyword">if</span> (<span class="keyword">this</span>.stale)</a></span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;255</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;            <span class="keyword">throw</span> <span class="keyword">new</span> StaleTransactionException(<span class="keyword">this</span>);</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;256</td>  <td class="nbHitsUncovered"><a title="Line 256: Conditional coverage 0% (0/2).">&nbsp;0</a></td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;<a title="Line 256: Conditional coverage 0% (0/2).">        <span class="keyword">if</span> (<span class="keyword">this</span>.queryVersion().asMap().containsKey(version))</a></span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;257</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;            <span class="keyword">throw</span> <span class="keyword">new</span> InvalidSchemaException(<span class="string">"one or more version "</span> + version + <span class="string">" objects still exist in database"</span>);</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;258</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;259</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        <span class="comment">// Delete schema version</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;260</td>  <td class="nbHitsUncovered"><a title="Line 260: Conditional coverage 0% (0/2).">&nbsp;0</a></td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;<a title="Line 260: Conditional coverage 0% (0/2).">        <span class="keyword">if</span> (!<span class="keyword">this</span>.schemas.deleteVersion(version))</a></span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;261</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;            <span class="keyword">return</span> <span class="keyword">false</span>;</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;262</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;        <span class="keyword">this</span>.db.deleteSchema(<span class="keyword">this</span>.kvt, version);</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;263</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;        <span class="keyword">return</span> <span class="keyword">true</span>;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;264</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    }</pre></td></tr>
<tr>  <td class="numLine">&nbsp;265</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;266</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="comment">/**</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;267</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * Get the underlying key/value store transaction.</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;268</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;269</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * &lt;p&gt;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;270</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * &lt;b&gt;Warning:&lt;/b&gt; making changes to the key/value store directly is not supported. If any changes</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;271</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * are made, all future behavior is undefined.</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;272</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * &lt;/p&gt;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;273</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;274</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @return the associated key/value transaction</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;275</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     */</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;276</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="keyword">public</span> KVTransaction getKVTransaction() {</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;277</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;        <span class="keyword">return</span> <span class="keyword">this</span>.kvt;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;278</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    }</pre></td></tr>
<tr>  <td class="numLine">&nbsp;279</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;280</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">// Transaction Lifecycle</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;281</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;282</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="comment">/**</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;283</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * Commit this transaction.</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;284</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;285</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @throws StaleTransactionException if this transaction is no longer usable</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;286</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @throws org.jsimpledb.kv.RetryTransactionException from {@link KVTransaction#commit KVTransaction.commit()}</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;287</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @throws RollbackOnlyTransactionException if this instance has been {@linkplain #setRollbackOnly marked} rollback only;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;288</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *  this instance will be automatically rolled back</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;289</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     */</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;290</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="keyword">public</span> <span class="keyword">synchronized</span> <span class="keyword">void</span> commit() {</pre></td></tr>
<tr>  <td class="numLine">&nbsp;291</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;292</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        <span class="comment">// Sanity check</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;293</td>  <td class="nbHitsUncovered"><a title="Line 293: Conditional coverage 0% (0/2).">&nbsp;0</a></td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;<a title="Line 293: Conditional coverage 0% (0/2).">        <span class="keyword">if</span> (<span class="keyword">this</span>.stale)</a></span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;294</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;            <span class="keyword">throw</span> <span class="keyword">new</span> StaleTransactionException(<span class="keyword">this</span>);</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;295</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;296</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        <span class="comment">// Rollback only?</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;297</td>  <td class="nbHitsUncovered"><a title="Line 297: Conditional coverage 0% (0/2).">&nbsp;0</a></td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;<a title="Line 297: Conditional coverage 0% (0/2).">        <span class="keyword">if</span> (<span class="keyword">this</span>.rollbackOnly) {</a></span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;298</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;            <span class="keyword">this</span>.log.debug(<span class="string">"commit() invoked on transaction "</span> + <span class="keyword">this</span> + <span class="string">" marked rollback-only, rolling back"</span>);</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;299</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;            <span class="keyword">this</span>.rollback();</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;300</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;            <span class="keyword">throw</span> <span class="keyword">new</span> RollbackOnlyTransactionException(<span class="keyword">this</span>);</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;301</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        }</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;302</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;        <span class="keyword">this</span>.stale = <span class="keyword">true</span>;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;303</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;304</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        <span class="comment">// Do before completion callbacks</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;305</td>  <td class="nbHitsUncovered"><a title="Line 305: Conditional coverage 0% (0/2).">&nbsp;0</a></td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;<a title="Line 305: Conditional coverage 0% (0/2).">        <span class="keyword">if</span> (<span class="keyword">this</span>.log.isTraceEnabled())</a></span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;306</td>  <td class="nbHitsUncovered"><a title="Line 306: Conditional coverage 0% (0/2).">&nbsp;0</a></td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;<a title="Line 306: Conditional coverage 0% (0/2).">            <span class="keyword">this</span>.log.trace(<span class="string">"commit() invoked on"</span> + (<span class="keyword">this</span>.readOnly ? <span class="string">" read-only"</span> : <span class="string">""</span>) + <span class="string">" transaction "</span> + <span class="keyword">this</span>);</a></span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;307</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;        Callback failedCallback = <span class="keyword">null</span>;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;308</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        <span class="keyword">try</span> {</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;309</td>  <td class="nbHitsUncovered"><a title="Line 309: Conditional coverage 0% (0/2).">&nbsp;0</a></td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;<a title="Line 309: Conditional coverage 0% (0/2).">            <span class="keyword">for</span> (Callback callback : <span class="keyword">this</span>.callbacks) {</a></span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;310</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;                failedCallback = callback;</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;311</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;                callback.beforeCommit(<span class="keyword">this</span>.readOnly);</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;312</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;            }</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;313</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;            failedCallback = <span class="keyword">null</span>;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;314</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        } <span class="keyword">finally</span> {</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;315</td>  <td class="nbHitsUncovered"><a title="Line 315: Conditional coverage 0% (0/2).">&nbsp;0</a></td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;<a title="Line 315: Conditional coverage 0% (0/2).">            <span class="keyword">if</span> (failedCallback != <span class="keyword">null</span>) {</a></span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;316</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;                <span class="keyword">this</span>.log.warn(<span class="string">"error invoking beforeCommit() method on transaction "</span></span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;317</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;                  + <span class="keyword">this</span> + <span class="string">" callback "</span> + failedCallback + <span class="string">", rolling back"</span>);</pre></td></tr>
<tr>  <td class="numLine">&nbsp;318</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;            }</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;319</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;            <span class="keyword">this</span>.triggerBeforeCompletion();</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;320</td>  <td class="nbHitsUncovered"><a title="Line 320: Conditional coverage 0% (0/2).">&nbsp;0</a></td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;<a title="Line 320: Conditional coverage 0% (0/2).">            <span class="keyword">if</span> (failedCallback != <span class="keyword">null</span>) {</a></span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;321</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;                <span class="keyword">try</span> {</pre></td></tr>
<tr>  <td class="numLine">&nbsp;322</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;                    <span class="keyword">try</span> {</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;323</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;                        <span class="keyword">this</span>.kvt.rollback();</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;324</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;                    } <span class="keyword">catch</span> (KVTransactionException e) {</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;325</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;                        <span class="comment">// ignore</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;326</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;                    }</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;327</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;                } <span class="keyword">finally</span> {</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;328</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;                    <span class="keyword">this</span>.triggerAfterCompletion(<span class="keyword">false</span>);</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;329</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;                }</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;330</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;            }</pre></td></tr>
<tr>  <td class="numLine">&nbsp;331</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        }</pre></td></tr>
<tr>  <td class="numLine">&nbsp;332</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;333</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        <span class="comment">// Commit KVTransaction and trigger after completion callbacks</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;334</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;        failedCallback = <span class="keyword">null</span>;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;335</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        <span class="keyword">try</span> {</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;336</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;            <span class="keyword">this</span>.kvt.commit();</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;337</td>  <td class="nbHitsUncovered"><a title="Line 337: Conditional coverage 0% (0/2).">&nbsp;0</a></td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;<a title="Line 337: Conditional coverage 0% (0/2).">            <span class="keyword">for</span> (Callback callback : <span class="keyword">this</span>.callbacks) {</a></span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;338</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;                failedCallback = callback;</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;339</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;                callback.afterCommit();</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;340</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;            }</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;341</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;            failedCallback = <span class="keyword">null</span>;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;342</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        } <span class="keyword">finally</span> {</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;343</td>  <td class="nbHitsUncovered"><a title="Line 343: Conditional coverage 0% (0/2).">&nbsp;0</a></td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;<a title="Line 343: Conditional coverage 0% (0/2).">            <span class="keyword">if</span> (failedCallback != <span class="keyword">null</span>)</a></span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;344</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;                <span class="keyword">this</span>.log.warn(<span class="string">"error invoking afterCommit() method on transaction "</span> + <span class="keyword">this</span> + <span class="string">" callback "</span> + failedCallback);</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;345</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;            <span class="keyword">this</span>.triggerAfterCompletion(<span class="keyword">true</span>);</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;346</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;        }</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;347</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;    }</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;348</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;349</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="comment">/**</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;350</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * Roll back this transaction.</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;351</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;352</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @throws StaleTransactionException if this transaction is no longer usable</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;353</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     */</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;354</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="keyword">public</span> <span class="keyword">synchronized</span> <span class="keyword">void</span> rollback() {</pre></td></tr>
<tr>  <td class="numLine">&nbsp;355</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;356</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        <span class="comment">// Sanity check</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;357</td>  <td class="nbHitsUncovered"><a title="Line 357: Conditional coverage 0% (0/2).">&nbsp;0</a></td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;<a title="Line 357: Conditional coverage 0% (0/2).">        <span class="keyword">if</span> (<span class="keyword">this</span>.stale)</a></span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;358</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;            <span class="keyword">throw</span> <span class="keyword">new</span> StaleTransactionException(<span class="keyword">this</span>);</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;359</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;        <span class="keyword">this</span>.stale = <span class="keyword">true</span>;</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;360</td>  <td class="nbHitsUncovered"><a title="Line 360: Conditional coverage 0% (0/2).">&nbsp;0</a></td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;<a title="Line 360: Conditional coverage 0% (0/2).">        <span class="keyword">if</span> (<span class="keyword">this</span>.log.isTraceEnabled())</a></span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;361</td>  <td class="nbHitsUncovered"><a title="Line 361: Conditional coverage 0% (0/2).">&nbsp;0</a></td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;<a title="Line 361: Conditional coverage 0% (0/2).">            <span class="keyword">this</span>.log.trace(<span class="string">"rollback() invoked on"</span> + (<span class="keyword">this</span>.readOnly ? <span class="string">" read-only"</span> : <span class="string">""</span>) + <span class="string">" transaction "</span> + <span class="keyword">this</span>);</a></span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;362</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;363</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        <span class="comment">// Do before completion callbacks</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;364</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;        <span class="keyword">this</span>.triggerBeforeCompletion();</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;365</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;366</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        <span class="comment">// Roll back KVTransaction and trigger after completion callbacks</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;367</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        <span class="keyword">try</span> {</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;368</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;            <span class="keyword">this</span>.kvt.rollback();</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;369</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        } <span class="keyword">finally</span> {</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;370</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;            <span class="keyword">this</span>.triggerAfterCompletion(<span class="keyword">false</span>);</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;371</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;        }</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;372</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;    }</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;373</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;374</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="keyword">private</span> <span class="comment">/*synchronized*/</span> <span class="keyword">void</span> triggerBeforeCompletion() {</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;375</td>  <td class="nbHitsUncovered"><a title="Line 375: Conditional coverage 0% (0/2).">&nbsp;0</a></td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;<a title="Line 375: Conditional coverage 0% (0/2).">        <span class="keyword">for</span> (Callback callback : <span class="keyword">this</span>.callbacks) {</a></span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;376</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;            <span class="keyword">try</span> {</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;377</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;                callback.beforeCompletion();</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;378</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;            } <span class="keyword">catch</span> (Throwable t) {</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;379</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;                <span class="keyword">this</span>.log.error(<span class="string">"error invoking beforeCompletion() method on transaction callback "</span> + callback, t);</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;380</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;            }</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;381</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;        }</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;382</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;    }</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;383</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;384</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="keyword">private</span> <span class="comment">/*synchronized*/</span> <span class="keyword">void</span> triggerAfterCompletion(<span class="keyword">boolean</span> committed) {</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;385</td>  <td class="nbHitsUncovered"><a title="Line 385: Conditional coverage 0% (0/2).">&nbsp;0</a></td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;<a title="Line 385: Conditional coverage 0% (0/2).">        <span class="keyword">for</span> (Callback callback : <span class="keyword">this</span>.callbacks) {</a></span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;386</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;            <span class="keyword">try</span> {</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;387</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;                callback.afterCompletion(committed);</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;388</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;            } <span class="keyword">catch</span> (Throwable t) {</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;389</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;                <span class="keyword">this</span>.log.error(<span class="string">"error invoking afterCompletion() method on transaction callback "</span> + callback, t);</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;390</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;            }</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;391</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;        }</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;392</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;    }</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;393</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;394</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="comment">/**</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;395</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * Determine whether this transaction is still valid. If not, all other methods in this class</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;396</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * will throw {@link StaleTransactionException}.</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;397</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;398</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @return true if this instance is still usable</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;399</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     */</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;400</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="keyword">public</span> <span class="keyword">synchronized</span> <span class="keyword">boolean</span> isValid() {</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;401</td>  <td class="nbHitsUncovered"><a title="Line 401: Conditional coverage 0% (0/2).">&nbsp;0</a></td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;<a title="Line 401: Conditional coverage 0% (0/2).">        <span class="keyword">return</span> !<span class="keyword">this</span>.stale;</a></span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;402</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    }</pre></td></tr>
<tr>  <td class="numLine">&nbsp;403</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;404</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="comment">/**</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;405</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * Determine whether this transaction is read-only.</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;406</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;407</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @return true if this instance is read-only</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;408</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @throws StaleTransactionException if this transaction is no longer usable</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;409</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     */</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;410</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="keyword">public</span> <span class="keyword">synchronized</span> <span class="keyword">boolean</span> isReadOnly() {</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;411</td>  <td class="nbHitsUncovered"><a title="Line 411: Conditional coverage 0% (0/2).">&nbsp;0</a></td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;<a title="Line 411: Conditional coverage 0% (0/2).">        <span class="keyword">if</span> (<span class="keyword">this</span>.stale)</a></span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;412</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;            <span class="keyword">throw</span> <span class="keyword">new</span> StaleTransactionException(<span class="keyword">this</span>);</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;413</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;        <span class="keyword">return</span> <span class="keyword">this</span>.readOnly;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;414</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    }</pre></td></tr>
<tr>  <td class="numLine">&nbsp;415</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;416</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="comment">/**</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;417</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * Enable or disaable read-only mode. When in read-only mode, all mutating operations will fail with</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;418</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * a {@link ReadOnlyTransactionException}.</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;419</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;420</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @param readOnly read-only setting</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;421</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @throws StaleTransactionException if this transaction is no longer usable</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;422</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     */</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;423</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="keyword">public</span> <span class="keyword">synchronized</span> <span class="keyword">void</span> setReadOnly(<span class="keyword">boolean</span> readOnly) {</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;424</td>  <td class="nbHitsUncovered"><a title="Line 424: Conditional coverage 0% (0/2).">&nbsp;0</a></td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;<a title="Line 424: Conditional coverage 0% (0/2).">        <span class="keyword">if</span> (<span class="keyword">this</span>.stale)</a></span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;425</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;            <span class="keyword">throw</span> <span class="keyword">new</span> StaleTransactionException(<span class="keyword">this</span>);</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;426</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;        <span class="keyword">this</span>.readOnly = readOnly;</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;427</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;    }</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;428</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;429</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="comment">/**</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;430</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * Determine whether this transaction is marked rollback only.</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;431</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;432</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @return true if this instance is marked for rollback only</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;433</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     */</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;434</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="keyword">public</span> <span class="keyword">synchronized</span> <span class="keyword">boolean</span> isRollbackOnly() {</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;435</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;        <span class="keyword">return</span> <span class="keyword">this</span>.rollbackOnly;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;436</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    }</pre></td></tr>
<tr>  <td class="numLine">&nbsp;437</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;438</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="comment">/**</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;439</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * Mark this transaction for rollback only. A subsequent attempt to {@link #commit} will throw an exception.</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;440</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     */</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;441</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="keyword">public</span> <span class="keyword">synchronized</span> <span class="keyword">void</span> setRollbackOnly() {</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;442</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;        <span class="keyword">this</span>.rollbackOnly = <span class="keyword">true</span>;</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;443</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;    }</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;444</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;445</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="comment">/**</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;446</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * Change the timeout for this transaction from its default value (optional operation).</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;447</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;448</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @param timeout transaction timeout in milliseconds, or zero for unlimited</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;449</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @throws UnsupportedOperationException if this transaction does not support timeouts</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;450</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @throws IllegalArgumentException if {@code timeout} is negative</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;451</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @throws StaleTransactionException if this transaction is no longer usable</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;452</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     */</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;453</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="keyword">public</span> <span class="keyword">void</span> setTimeout(<span class="keyword">long</span> timeout) {</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;454</td>  <td class="nbHitsUncovered"><a title="Line 454: Conditional coverage 0% (0/2).">&nbsp;0</a></td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;<a title="Line 454: Conditional coverage 0% (0/2).">        <span class="keyword">if</span> (<span class="keyword">this</span>.stale)</a></span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;455</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;            <span class="keyword">throw</span> <span class="keyword">new</span> StaleTransactionException(<span class="keyword">this</span>);</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;456</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;        <span class="keyword">this</span>.kvt.setTimeout(timeout);</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;457</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;    }</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;458</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;459</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="comment">/**</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;460</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * Register a transaction {@link Callback} to be invoked when this transaction completes.</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;461</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * Callbacks will be invoked in the order they are registered, but &lt;i&gt;duplicate registrations are ignored&lt;/i&gt;.</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;462</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;463</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * &lt;p&gt;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;464</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * Note: if you are using Spring for transaction demarcation (via {@link org.jsimpledb.spring.JSimpleDBTransactionManager}),</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;465</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * then you may also use Spring's</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;466</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * {@link org.springframework.transaction.support.TransactionSynchronizationManager#registerSynchronization</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;467</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * TransactionSynchronizationManager.registerSynchronization()} instead of this method.</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;468</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * &lt;/p&gt;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;469</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;470</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @param callback callback to invoke</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;471</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @throws IllegalArgumentException if {@code callback} is null</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;472</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @throws StaleTransactionException if this transaction is no longer usable</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;473</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     */</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;474</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="keyword">public</span> <span class="keyword">synchronized</span> <span class="keyword">void</span> addCallback(Callback callback) {</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;475</td>  <td class="nbHitsUncovered"><a title="Line 475: Conditional coverage 0% (0/2).">&nbsp;0</a></td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;<a title="Line 475: Conditional coverage 0% (0/2).">        <span class="keyword">if</span> (callback == <span class="keyword">null</span>)</a></span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;476</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;            <span class="keyword">throw</span> <span class="keyword">new</span> IllegalArgumentException(<span class="string">"nullcallback "</span>);</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;477</td>  <td class="nbHitsUncovered"><a title="Line 477: Conditional coverage 0% (0/2).">&nbsp;0</a></td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;<a title="Line 477: Conditional coverage 0% (0/2).">        <span class="keyword">if</span> (<span class="keyword">this</span>.stale)</a></span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;478</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;            <span class="keyword">throw</span> <span class="keyword">new</span> StaleTransactionException(<span class="keyword">this</span>);</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;479</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;        <span class="keyword">this</span>.callbacks.add(callback);</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;480</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;    }</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;481</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;482</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="comment">/**</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;483</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * Create an empty, in-memory transaction initialized with the same schema history as this transaction.</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;484</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * The result can be used as a destination for "snapshot" copies of objects made via {@link #copy copy()}.</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;485</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;486</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * &lt;p&gt;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;487</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * The returned {@link SnapshotTransaction} does not support {@link #commit}, {@link #rollback}, {@link #setRollbackOnly},</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;488</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * or {@link #addCallback addCallback()}. However, it can be used indefinitely after this transaction closes.</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;489</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * &lt;/p&gt;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;490</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;491</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @return uncloseable, empty, in-memory transaction with compatible schema information</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;492</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     */</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;493</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="keyword">public</span> SnapshotTransaction createSnapshotTransaction() {</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;494</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;        <span class="keyword">return</span> <span class="keyword">new</span> SnapshotTransaction(<span class="keyword">this</span>);</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;495</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    }</pre></td></tr>
<tr>  <td class="numLine">&nbsp;496</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;497</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">// Object Lifecycle</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;498</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;499</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="comment">/**</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;500</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * Create a new object with the given object ID, if it doesn't already exist. If it does exist, nothing happens.</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;501</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;502</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * &lt;p&gt;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;503</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * If the object doesn't already exist, all fields are set to their default values and the object's</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;504</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * schema version is set to {@linkplain #getSchema() the version associated with this transaction}.</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;505</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * &lt;/p&gt;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;506</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;507</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @param id object ID</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;508</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @return true if the object did not exist and was created, false if the object already existed</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;509</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @throws UnknownTypeException if {@code id} does not correspond to a known object type in this transaction's schema version</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;510</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @throws IllegalArgumentException if {@code id} is null</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;511</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @throws ReadOnlyTransactionException if this transaction has been {@linkplain #setReadOnly set read-only}</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;512</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @throws StaleTransactionException if this transaction is no longer usable</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;513</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     */</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;514</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="keyword">public</span> <span class="keyword">boolean</span> create(ObjId id) {</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;515</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;        <span class="keyword">return</span> <span class="keyword">this</span>.create(id, <span class="keyword">this</span>.schema.versionNumber);</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;516</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    }</pre></td></tr>
<tr>  <td class="numLine">&nbsp;517</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;518</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="comment">/**</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;519</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * Create a new object with the given object ID, if it doesn't already exist. If it does exist, nothing happens.</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;520</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;521</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * &lt;p&gt;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;522</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * If the object doesn't already exist, all fields are set to their default values and the object's</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;523</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * schema version is set to the specified version.</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;524</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * &lt;/p&gt;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;525</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;526</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @param id object ID</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;527</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @param versionNumber schema version number to use for newly created object</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;528</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @return true if the object did not exist and was created, false if the object already existed</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;529</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @throws UnknownTypeException if {@code id} does not correspond to a known object type in the specified schema version</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;530</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @throws IllegalArgumentException if {@code id} is null</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;531</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @throws IllegalArgumentException if {@code versionNumber} is invalid or unknown</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;532</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @throws ReadOnlyTransactionException if this transaction has been {@linkplain #setReadOnly set read-only}</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;533</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @throws StaleTransactionException if this transaction is no longer usable</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;534</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     */</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;535</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="keyword">public</span> <span class="keyword">synchronized</span> <span class="keyword">boolean</span> create(ObjId id, <span class="keyword">int</span> versionNumber) {</pre></td></tr>
<tr>  <td class="numLine">&nbsp;536</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;537</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        <span class="comment">// Sanity check</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;538</td>  <td class="nbHitsUncovered"><a title="Line 538: Conditional coverage 0% (0/2).">&nbsp;0</a></td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;<a title="Line 538: Conditional coverage 0% (0/2).">        <span class="keyword">if</span> (id == <span class="keyword">null</span>)</a></span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;539</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;            <span class="keyword">throw</span> <span class="keyword">new</span> IllegalArgumentException(<span class="string">"null id"</span>);</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;540</td>  <td class="nbHitsUncovered"><a title="Line 540: Conditional coverage 0% (0/2).">&nbsp;0</a></td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;<a title="Line 540: Conditional coverage 0% (0/2).">        <span class="keyword">if</span> (<span class="keyword">this</span>.stale)</a></span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;541</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;            <span class="keyword">throw</span> <span class="keyword">new</span> StaleTransactionException(<span class="keyword">this</span>);</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;542</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;543</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        <span class="comment">// Does object already exist?</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;544</td>  <td class="nbHitsUncovered"><a title="Line 544: Conditional coverage 0% (0/2).">&nbsp;0</a></td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;<a title="Line 544: Conditional coverage 0% (0/2).">        <span class="keyword">if</span> (<span class="keyword">this</span>.exists(id))</a></span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;545</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;            <span class="keyword">return</span> <span class="keyword">false</span>;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;546</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;547</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        <span class="comment">// Initialize object</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;548</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;        <span class="keyword">this</span>.initialize(id, <span class="keyword">this</span>.schemas.getVersion(versionNumber).getObjType(id.getStorageId()));</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;549</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;550</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        <span class="comment">// Done</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;551</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;        <span class="keyword">return</span> <span class="keyword">true</span>;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;552</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    }</pre></td></tr>
<tr>  <td class="numLine">&nbsp;553</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;554</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="comment">/**</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;555</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * Create a new object with a randomly assigned object ID and having the given type.</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;556</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;557</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * &lt;p&gt;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;558</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * All fields will be set to their default values.</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;559</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * The object's schema version will be set to {@linkplain #getSchema() the version associated with this transaction}.</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;560</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * &lt;/p&gt;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;561</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;562</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @param storageId object type storage ID</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;563</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @return object id of newly created object</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;564</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @throws UnknownTypeException if {@code storageId} does not correspond to a known object type in this transaction's schema</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;565</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @throws ReadOnlyTransactionException if this transaction has been {@linkplain #setReadOnly set read-only}</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;566</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @throws StaleTransactionException if this transaction is no longer usable</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;567</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     */</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;568</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="keyword">public</span> ObjId create(<span class="keyword">int</span> storageId) {</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;569</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;        <span class="keyword">return</span> <span class="keyword">this</span>.create(storageId, <span class="keyword">this</span>.schema.versionNumber);</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;570</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    }</pre></td></tr>
<tr>  <td class="numLine">&nbsp;571</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;572</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="comment">/**</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;573</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * Create a new object with a randomly assigned object ID and having the given type and schema version.</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;574</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;575</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * &lt;p&gt;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;576</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * All fields will be set to their default values.</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;577</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * The object's schema version will be set to the specified version.</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;578</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * &lt;/p&gt;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;579</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;580</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @param storageId object type storage ID</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;581</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @param versionNumber schema version number to use for newly created object</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;582</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @return object id of newly created object</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;583</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @throws UnknownTypeException if {@code storageId} does not correspond to a known object type in the specified schema version</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;584</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @throws IllegalArgumentException if {@code versionNumber} is invalid or unknown</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;585</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @throws ReadOnlyTransactionException if this transaction has been {@linkplain #setReadOnly set read-only}</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;586</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @throws StaleTransactionException if this transaction is no longer usable</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;587</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     */</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;588</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="keyword">public</span> <span class="keyword">synchronized</span> ObjId create(<span class="keyword">int</span> storageId, <span class="keyword">int</span> versionNumber) {</pre></td></tr>
<tr>  <td class="numLine">&nbsp;589</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;590</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        <span class="comment">// Sanity check</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;591</td>  <td class="nbHitsUncovered"><a title="Line 591: Conditional coverage 0% (0/2).">&nbsp;0</a></td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;<a title="Line 591: Conditional coverage 0% (0/2).">        <span class="keyword">if</span> (<span class="keyword">this</span>.stale)</a></span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;592</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;            <span class="keyword">throw</span> <span class="keyword">new</span> StaleTransactionException(<span class="keyword">this</span>);</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;593</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;        <span class="keyword">final</span> ObjType objType = <span class="keyword">this</span>.schemas.getVersion(versionNumber).getObjType(storageId);</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;594</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;595</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        <span class="comment">// Generate object ID</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;596</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;        <span class="keyword">final</span> ObjId id = <span class="keyword">this</span>.generateIdValidated(objType.storageId);</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;597</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;598</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        <span class="comment">// Initialize object</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;599</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;        <span class="keyword">this</span>.initialize(id, objType);</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;600</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;601</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        <span class="comment">// Done</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;602</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;        <span class="keyword">return</span> id;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;603</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    }</pre></td></tr>
<tr>  <td class="numLine">&nbsp;604</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;605</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="comment">/**</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;606</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * Generate a random, unused {@link ObjId} for the given storage ID.</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;607</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;608</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @param storageId object type storage ID</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;609</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @return random unassigned object id</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;610</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @throws UnknownTypeException if {@code storageId} does not correspond to any known object type</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;611</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @throws StaleTransactionException if this transaction is no longer usable</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;612</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     */</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;613</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="keyword">public</span> <span class="keyword">synchronized</span> ObjId generateId(<span class="keyword">int</span> storageId) {</pre></td></tr>
<tr>  <td class="numLine">&nbsp;614</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;615</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        <span class="comment">// Sanity check</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;616</td>  <td class="nbHitsUncovered"><a title="Line 616: Conditional coverage 0% (0/2).">&nbsp;0</a></td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;<a title="Line 616: Conditional coverage 0% (0/2).">        <span class="keyword">if</span> (<span class="keyword">this</span>.stale)</a></span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;617</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;            <span class="keyword">throw</span> <span class="keyword">new</span> StaleTransactionException(<span class="keyword">this</span>);</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;618</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;        <span class="keyword">final</span> ObjTypeStorageInfo info = <span class="keyword">this</span>.schemas.verifyStorageInfo(storageId, ObjTypeStorageInfo.<span class="keyword">class</span>);</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;619</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;620</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        <span class="comment">// Generate ID</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;621</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;        <span class="keyword">return</span> <span class="keyword">this</span>.generateIdValidated(info.storageId);</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;622</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    }</pre></td></tr>
<tr>  <td class="numLine">&nbsp;623</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;624</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="keyword">private</span> <span class="comment">/*synchronized*/</span> ObjId generateIdValidated(<span class="keyword">int</span> storageId) {</pre></td></tr>
<tr>  <td class="numLine">&nbsp;625</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;626</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        <span class="comment">// Create a new, unique key</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;627</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;        <span class="keyword">final</span> ByteWriter keyWriter = <span class="keyword">new</span> ByteWriter();</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;628</td>  <td class="nbHitsUncovered"><a title="Line 628: Conditional coverage 0% (0/2).">&nbsp;0</a></td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;<a title="Line 628: Conditional coverage 0% (0/2).">        <span class="keyword">for</span> (<span class="keyword">int</span> attempts = 0; attempts &lt; MAX_GENERATED_KEY_ATTEMPTS; attempts++) {</a></span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;629</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;            <span class="keyword">final</span> ObjId id = <span class="keyword">new</span> ObjId(storageId);</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;630</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;            id.writeTo(keyWriter);</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;631</td>  <td class="nbHitsUncovered"><a title="Line 631: Conditional coverage 0% (0/2).">&nbsp;0</a></td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;<a title="Line 631: Conditional coverage 0% (0/2).">            <span class="keyword">if</span> (<span class="keyword">this</span>.kvt.get(keyWriter.getBytes()) == <span class="keyword">null</span>)</a></span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;632</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;                <span class="keyword">return</span> id;</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;633</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;            keyWriter.reset(0);</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;634</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        }</pre></td></tr>
<tr>  <td class="numLine">&nbsp;635</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;636</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        <span class="comment">// Give up</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;637</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;        <span class="keyword">throw</span> <span class="keyword">new</span> DatabaseException(<span class="string">"could not find a new, unused object ID after "</span></span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;638</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;          + MAX_GENERATED_KEY_ATTEMPTS + <span class="string">" attempts; is our source of randomness truly random?"</span>);</pre></td></tr>
<tr>  <td class="numLine">&nbsp;639</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    }</pre></td></tr>
<tr>  <td class="numLine">&nbsp;640</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;641</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="keyword">private</span> <span class="keyword">synchronized</span> <span class="keyword">void</span> initialize(ObjId id, ObjType objType) {</pre></td></tr>
<tr>  <td class="numLine">&nbsp;642</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;643</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        <span class="comment">// Sanity check</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;644</td>  <td class="nbHitsUncovered"><a title="Line 644: Conditional coverage 0% (0/2).">&nbsp;0</a></td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;<a title="Line 644: Conditional coverage 0% (0/2).">        <span class="keyword">if</span> (<span class="keyword">this</span>.stale)</a></span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;645</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;            <span class="keyword">throw</span> <span class="keyword">new</span> StaleTransactionException(<span class="keyword">this</span>);</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;646</td>  <td class="nbHitsUncovered"><a title="Line 646: Conditional coverage 0% (0/2).">&nbsp;0</a></td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;<a title="Line 646: Conditional coverage 0% (0/2).">        <span class="keyword">if</span> (<span class="keyword">this</span>.readOnly)</a></span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;647</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;            <span class="keyword">throw</span> <span class="keyword">new</span> ReadOnlyTransactionException(<span class="keyword">this</span>);</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;648</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;649</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        <span class="comment">// Write object meta-data</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;650</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;        ObjInfo.write(<span class="keyword">this</span>, id, objType.schema.versionNumber, <span class="keyword">false</span>);</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;651</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;652</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        <span class="comment">// Write object version index entry</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;653</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;        <span class="keyword">this</span>.kvt.put(Database.buildVersionIndexKey(id, objType.schema.versionNumber), ByteUtil.EMPTY);</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;654</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;655</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        <span class="comment">// Initialize counters to zero</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;656</td>  <td class="nbHitsUncovered"><a title="Line 656: Conditional coverage 0% (0/2).">&nbsp;0</a></td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;<a title="Line 656: Conditional coverage 0% (0/2).">        <span class="keyword">if</span> (!objType.counterFields.isEmpty()) {</a></span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;657</td>  <td class="nbHitsUncovered"><a title="Line 657: Conditional coverage 0% (0/2).">&nbsp;0</a></td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;<a title="Line 657: Conditional coverage 0% (0/2).">            <span class="keyword">for</span> (CounterField field : objType.counterFields.values())</a></span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;658</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;                <span class="keyword">this</span>.kvt.put(field.buildKey(id), <span class="keyword">this</span>.kvt.encodeCounter(0));</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;659</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        }</pre></td></tr>
<tr>  <td class="numLine">&nbsp;660</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;661</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        <span class="comment">// Write simple field index entries</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;662</td>  <td class="nbHitsUncovered"><a title="Line 662: Conditional coverage 0% (0/2).">&nbsp;0</a></td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;<a title="Line 662: Conditional coverage 0% (0/2).">        <span class="keyword">for</span> (SimpleField&lt;?&gt; field : objType.simpleFields.values()) {</a></span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;663</td>  <td class="nbHitsUncovered"><a title="Line 663: Conditional coverage 0% (0/2).">&nbsp;0</a></td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;<a title="Line 663: Conditional coverage 0% (0/2).">            <span class="keyword">if</span> (field.indexed)</a></span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;664</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;                <span class="keyword">this</span>.kvt.put(Transaction.buildSimpleIndexEntry(field, id, <span class="keyword">null</span>), ByteUtil.EMPTY);</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;665</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;        }</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;666</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;667</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        <span class="comment">// Write composite index entries</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;668</td>  <td class="nbHitsUncovered"><a title="Line 668: Conditional coverage 0% (0/2).">&nbsp;0</a></td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;<a title="Line 668: Conditional coverage 0% (0/2).">        <span class="keyword">for</span> (CompositeIndex index : objType.compositeIndexes.values())</a></span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;669</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;            <span class="keyword">this</span>.kvt.put(Transaction.buildDefaultCompositeIndexEntry(id, index), ByteUtil.EMPTY);</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;670</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;671</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        <span class="comment">// Notify listeners</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;672</td>  <td class="nbHitsUncovered"><a title="Line 672: Conditional coverage 0% (0/2).">&nbsp;0</a></td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;<a title="Line 672: Conditional coverage 0% (0/2).">        <span class="keyword">for</span> (CreateListener listener : <span class="keyword">this</span>.createListeners.toArray(<span class="keyword">new</span> CreateListener[<span class="keyword">this</span>.createListeners.size()]))</a></span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;673</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;            listener.onCreate(<span class="keyword">this</span>, id);</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;674</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;    }</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;675</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;676</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="comment">/**</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;677</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * Delete an object. Does nothing if object does not exist (e.g., has already been deleted).</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;678</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;679</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * &lt;p&gt;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;680</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * This method does &lt;i&gt;not&lt;/i&gt; change the object's schema version if it has a different version that this transaction.</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;681</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * &lt;/p&gt;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;682</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;683</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * &lt;p&gt;&lt;b&gt;Secondary Deletions&lt;/b&gt;&lt;/p&gt;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;684</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;685</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * &lt;p&gt;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;686</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * Deleting an object can trigger additional secondary deletions. Specifically,</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;687</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * (a) if the object contains reference fields with {@linkplain ReferenceField#cascadeDelete delete cascade} enabled,</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;688</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * any objects referred to through those fields will also be deleted, and (b) if the object is referred to by any other objects</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;689</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * through fields configured for {@link DeleteAction#DELETE}, those referring objects will be deleted.</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;690</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * &lt;/p&gt;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;691</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;692</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * &lt;p&gt;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;693</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * In any case, deletions occur one at a time, and only when an object is actually deleted are any associated secondary</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;694</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * deletions added to an internal deletion queue. However, the order in which objects on this deletion queue are</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;695</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * processed is unspecified. For an example of where this ordering matters, consider an object {@code A} referring to objects</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;696</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * {@code B} and {@code C} with delete cascading references, where B also refers to C with a {@link DeleteAction#EXCEPTION}</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;697</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * reference. Then if {@code A} is deleted, it's indeterminate whether a {@link ReferencedObjectException} will be thrown,</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;698</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * as that depends on whether {@code B} or {@code C} is deleted first (with the answer being, respectively, no and yes).</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;699</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * &lt;/p&gt;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;700</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;701</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @param id object ID of the object to delete</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;702</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @return true if object was found and deleted, false if object was not found,</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;703</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *  or if {@code id} specifies an unknown object type</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;704</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @throws ReferencedObjectException if the object is referenced by some other object</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;705</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *  through a reference field configured for {@link DeleteAction#EXCEPTION}</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;706</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @throws IllegalArgumentException if {@code id} is null</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;707</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @throws ReadOnlyTransactionException if this transaction has been {@linkplain #setReadOnly set read-only}</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;708</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @throws StaleTransactionException if this transaction is no longer usable</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;709</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     */</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;710</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="keyword">public</span> <span class="keyword">synchronized</span> <span class="keyword">boolean</span> delete(ObjId id) {</pre></td></tr>
<tr>  <td class="numLine">&nbsp;711</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;712</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        <span class="comment">// Sanity check</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;713</td>  <td class="nbHitsUncovered"><a title="Line 713: Conditional coverage 0% (0/2).">&nbsp;0</a></td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;<a title="Line 713: Conditional coverage 0% (0/2).">        <span class="keyword">if</span> (id == <span class="keyword">null</span>)</a></span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;714</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;            <span class="keyword">throw</span> <span class="keyword">new</span> IllegalArgumentException(<span class="string">"null id"</span>);</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;715</td>  <td class="nbHitsUncovered"><a title="Line 715: Conditional coverage 0% (0/2).">&nbsp;0</a></td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;<a title="Line 715: Conditional coverage 0% (0/2).">        <span class="keyword">if</span> (<span class="keyword">this</span>.stale)</a></span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;716</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;            <span class="keyword">throw</span> <span class="keyword">new</span> StaleTransactionException(<span class="keyword">this</span>);</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;717</td>  <td class="nbHitsUncovered"><a title="Line 717: Conditional coverage 0% (0/2).">&nbsp;0</a></td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;<a title="Line 717: Conditional coverage 0% (0/2).">        <span class="keyword">if</span> (<span class="keyword">this</span>.readOnly)</a></span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;718</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;            <span class="keyword">throw</span> <span class="keyword">new</span> ReadOnlyTransactionException(<span class="keyword">this</span>);</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;719</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;720</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        <span class="comment">// Get object info</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;721</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        <span class="keyword">try</span> {</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;722</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;            <span class="keyword">this</span>.getObjectInfo(id, <span class="keyword">false</span>);</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;723</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;        } <span class="keyword">catch</span> (DeletedObjectException | UnknownTypeException e) {</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;724</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;            <span class="keyword">return</span> <span class="keyword">false</span>;</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;725</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;        }</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;726</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;727</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        <span class="comment">// Handle delete cascade and recurive DeleteAction.DELETE without hogging Java stack</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;728</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;        <span class="keyword">final</span> ObjIdSet deletables = <span class="keyword">new</span> ObjIdSet();</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;729</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;        deletables.add(id);</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;730</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;        <span class="keyword">boolean</span> found = <span class="keyword">false</span>;</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;731</td>  <td class="nbHitsUncovered"><a title="Line 731: Conditional coverage 0% (0/2).">&nbsp;0</a></td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;<a title="Line 731: Conditional coverage 0% (0/2).">        <span class="keyword">while</span> (!deletables.isEmpty())</a></span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;732</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;            found |= <span class="keyword">this</span>.doDelete(deletables.iterator().next(), deletables);</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;733</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;734</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        <span class="comment">// Done</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;735</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;        <span class="keyword">return</span> found;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;736</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    }</pre></td></tr>
<tr>  <td class="numLine">&nbsp;737</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;738</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="keyword">private</span> <span class="keyword">synchronized</span> <span class="keyword">boolean</span> doDelete(<span class="keyword">final</span> ObjId id, ObjIdSet deletables) {</pre></td></tr>
<tr>  <td class="numLine">&nbsp;739</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;740</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        <span class="comment">// Loop here to handle any mutations within delete notification listener callbacks</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;741</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        ObjInfo info;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;742</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        <span class="keyword">while</span> (<span class="keyword">true</span>) {</pre></td></tr>
<tr>  <td class="numLine">&nbsp;743</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;744</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;            <span class="comment">// Get object info</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;745</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;            <span class="keyword">try</span> {</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;746</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;                info = <span class="keyword">this</span>.getObjectInfo(id, <span class="keyword">false</span>);</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;747</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;            } <span class="keyword">catch</span> (DeletedObjectException e) {                    <span class="comment">// possibly due to a cycle of DeleteAction.DELETE references</span></span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;748</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;                deletables.remove(id);</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;749</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;                <span class="keyword">return</span> <span class="keyword">false</span>;</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;750</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;            } <span class="keyword">catch</span> (UnknownTypeException e) {</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;751</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;                <span class="keyword">throw</span> <span class="keyword">new</span> InconsistentDatabaseException(<span class="string">"encountered reference with unknown type during delete cascade: "</span> + id, e);</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;752</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;            }</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;753</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;754</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;            <span class="comment">// Determine if any EXCEPTION reference fields refer to the object (from some other object); if so, throw exception</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;755</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;            <span class="keyword">for</span> (ReferenceFieldStorageInfo fieldInfo :</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;756</td>  <td class="nbHitsUncovered"><a title="Line 756: Conditional coverage 0% (0/2).">&nbsp;0</a></td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;<a title="Line 756: Conditional coverage 0% (0/2).">              Iterables.filter(<span class="keyword">this</span>.schemas.storageInfos.values(), ReferenceFieldStorageInfo.<span class="keyword">class</span>)) {</a></span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;757</td>  <td class="nbHitsUncovered"><a title="Line 757: Conditional coverage 0% (0/2).">&nbsp;0</a></td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;<a title="Line 757: Conditional coverage 0% (0/2).">                <span class="keyword">for</span> (ObjId referrer : <span class="keyword">this</span>.findReferrers(id, DeleteAction.EXCEPTION, fieldInfo.storageId)) {</a></span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;758</td>  <td class="nbHitsUncovered"><a title="Line 758: Conditional coverage 0% (0/2).">&nbsp;0</a></td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;<a title="Line 758: Conditional coverage 0% (0/2).">                    <span class="keyword">if</span> (!referrer.equals(id))</a></span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;759</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;                        <span class="keyword">throw</span> <span class="keyword">new</span> ReferencedObjectException(id, referrer, fieldInfo.storageId);</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;760</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;                }</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;761</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;            }</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;762</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;763</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;            <span class="comment">// Do we need to issue delete notifications for the object being deleted?</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;764</td>  <td class="nbHitsUncovered"><a title="Line 764: Conditional coverage 0% (0/4) [each condition: 0%, 0%].">&nbsp;0</a></td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;<a title="Line 764: Conditional coverage 0% (0/4) [each condition: 0%, 0%].">            <span class="keyword">if</span> (info.isDeleteNotified() || <span class="keyword">this</span>.deleteListeners.isEmpty())</a></span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;765</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;                <span class="keyword">break</span>;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;766</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;767</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;            <span class="comment">// Issue delete notifications and retry</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;768</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;            ObjInfo.write(<span class="keyword">this</span>, id, info.getVersion(), <span class="keyword">true</span>);</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;769</td>  <td class="nbHitsUncovered"><a title="Line 769: Conditional coverage 0% (0/2).">&nbsp;0</a></td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;<a title="Line 769: Conditional coverage 0% (0/2).">            <span class="keyword">for</span> (DeleteListener listener : <span class="keyword">this</span>.deleteListeners.toArray(<span class="keyword">new</span> DeleteListener[<span class="keyword">this</span>.deleteListeners.size()]))</a></span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;770</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;                listener.onDelete(<span class="keyword">this</span>, id);</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;771</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        }</pre></td></tr>
<tr>  <td class="numLine">&nbsp;772</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;773</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        <span class="comment">// Find all objects referred to by a reference field with cascadeDelete = true and add them to deletables</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;774</td>  <td class="nbHitsUncovered"><a title="Line 774: Conditional coverage 0% (0/2).">&nbsp;0</a></td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;<a title="Line 774: Conditional coverage 0% (0/2).">        <span class="keyword">for</span> (ReferenceField field : Iterables.filter(</a></span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;775</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;          Iterables.filter(info.getObjType().referenceFields.values(), ReferenceField.<span class="keyword">class</span>), <span class="keyword">new</span> HasCascadeDelete())) {</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;776</td>  <td class="nbHitsUncovered"><a title="Line 776: Conditional coverage 0% (0/2).">&nbsp;0</a></td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;<a title="Line 776: Conditional coverage 0% (0/2).">            <span class="keyword">final</span> Iterable&lt;ObjId&gt; refs = field.parent != <span class="keyword">null</span> ?</a></span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;777</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;              field.parent.iterateSubField(<span class="keyword">this</span>, id, field) : Collections.singleton(field.getValue(<span class="keyword">this</span>, id));</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;778</td>  <td class="nbHitsUncovered"><a title="Line 778: Conditional coverage 0% (0/2).">&nbsp;0</a></td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;<a title="Line 778: Conditional coverage 0% (0/2).">            <span class="keyword">for</span> (ObjId ref : refs) {</a></span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;779</td>  <td class="nbHitsUncovered"><a title="Line 779: Conditional coverage 0% (0/2).">&nbsp;0</a></td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;<a title="Line 779: Conditional coverage 0% (0/2).">                <span class="keyword">if</span> (ref != <span class="keyword">null</span>)</a></span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;780</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;                    deletables.add(ref);</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;781</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;            }</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;782</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;        }</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;783</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;784</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        <span class="comment">// Actually delete the object</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;785</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;        <span class="keyword">this</span>.deleteObjectData(info);</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;786</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;        deletables.remove(id);</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;787</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;788</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        <span class="comment">// Find all UNREFERENCE references and unreference them</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;789</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        <span class="keyword">for</span> (ReferenceFieldStorageInfo fieldInfo :</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;790</td>  <td class="nbHitsUncovered"><a title="Line 790: Conditional coverage 0% (0/2).">&nbsp;0</a></td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;<a title="Line 790: Conditional coverage 0% (0/2).">          Iterables.filter(<span class="keyword">this</span>.schemas.storageInfos.values(), ReferenceFieldStorageInfo.<span class="keyword">class</span>)) {</a></span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;791</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;            <span class="keyword">final</span> NavigableSet&lt;ObjId&gt; referrers = <span class="keyword">this</span>.findReferrers(id, DeleteAction.UNREFERENCE, fieldInfo.storageId);</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;792</td>  <td class="nbHitsUncovered"><a title="Line 792: Conditional coverage 0% (0/2).">&nbsp;0</a></td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;<a title="Line 792: Conditional coverage 0% (0/2).">            <span class="keyword">if</span> (fieldInfo.isSubField()) {</a></span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;793</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;                <span class="keyword">final</span> ComplexFieldStorageInfo&lt;?&gt; superFieldInfo = <span class="keyword">this</span>.schemas.verifyStorageInfo(</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;794</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;                  fieldInfo.superFieldStorageId, ComplexFieldStorageInfo.<span class="keyword">class</span>);</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;795</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;                superFieldInfo.unreferenceAll(<span class="keyword">this</span>, fieldInfo.storageId, id, referrers);</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;796</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;            } <span class="keyword">else</span> {</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;797</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;                <span class="keyword">final</span> <span class="keyword">int</span> storageId = fieldInfo.storageId;</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;798</td>  <td class="nbHitsUncovered"><a title="Line 798: Conditional coverage 0% (0/2).">&nbsp;0</a></td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;<a title="Line 798: Conditional coverage 0% (0/2).">                <span class="keyword">for</span> (ObjId referrer : referrers)</a></span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;799</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;                    <span class="keyword">this</span>.writeSimpleField(referrer, storageId, <span class="keyword">null</span>, <span class="keyword">false</span>);</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;800</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;            }</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;801</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;        }</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;802</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;803</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        <span class="comment">// Find all DELETE references and mark the containing object for deletion (caller will call us back to actually delete)</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;804</td>  <td class="nbHitsUncovered"><a title="Line 804: Conditional coverage 0% (0/2).">&nbsp;0</a></td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;<a title="Line 804: Conditional coverage 0% (0/2).">        <span class="keyword">for</span> (ObjId referrer : <span class="keyword">this</span>.findReferrers(id, DeleteAction.DELETE, -1))</a></span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;805</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;            deletables.add(referrer);</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;806</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;807</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        <span class="comment">// Done</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;808</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;        <span class="keyword">return</span> <span class="keyword">true</span>;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;809</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    }</pre></td></tr>
<tr>  <td class="numLine">&nbsp;810</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;811</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="comment">// Delete all of an object's data</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;812</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="keyword">private</span> <span class="keyword">void</span> deleteObjectData(ObjInfo info) {</pre></td></tr>
<tr>  <td class="numLine">&nbsp;813</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;814</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        <span class="comment">// Delete object's simple field index entries</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;815</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;        <span class="keyword">final</span> ObjId id = info.getId();</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;816</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;        <span class="keyword">final</span> ObjType type = info.getObjType();</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;817</td>  <td class="nbHitsUncovered"><a title="Line 817: Conditional coverage 0% (0/2).">&nbsp;0</a></td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;<a title="Line 817: Conditional coverage 0% (0/2).">        <span class="keyword">for</span> (SimpleField&lt;?&gt; field : type.simpleFields.values()) {</a></span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;818</td>  <td class="nbHitsUncovered"><a title="Line 818: Conditional coverage 0% (0/2).">&nbsp;0</a></td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;<a title="Line 818: Conditional coverage 0% (0/2).">            <span class="keyword">if</span> (field.indexed)</a></span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;819</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;                <span class="keyword">this</span>.kvt.remove(Transaction.buildSimpleIndexEntry(field, id, <span class="keyword">this</span>.kvt.get(field.buildKey(id))));</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;820</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;        }</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;821</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;822</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        <span class="comment">// Delete object's composite index entries</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;823</td>  <td class="nbHitsUncovered"><a title="Line 823: Conditional coverage 0% (0/2).">&nbsp;0</a></td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;<a title="Line 823: Conditional coverage 0% (0/2).">        <span class="keyword">for</span> (CompositeIndex index : type.compositeIndexes.values())</a></span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;824</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;            <span class="keyword">this</span>.kvt.remove(<span class="keyword">this</span>.buildCompositeIndexEntry(id, index));</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;825</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;826</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        <span class="comment">// Delete object's complex field index entries</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;827</td>  <td class="nbHitsUncovered"><a title="Line 827: Conditional coverage 0% (0/2).">&nbsp;0</a></td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;<a title="Line 827: Conditional coverage 0% (0/2).">        <span class="keyword">for</span> (ComplexField&lt;?&gt; field : type.complexFields.values())</a></span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;828</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;            field.removeIndexEntries(<span class="keyword">this</span>, id);</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;829</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;830</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        <span class="comment">// Delete object meta-data and all field content</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;831</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;        <span class="keyword">final</span> <span class="keyword">byte</span>[] minKey = info.getId().getBytes();</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;832</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;        <span class="keyword">final</span> <span class="keyword">byte</span>[] maxKey = ByteUtil.getKeyAfterPrefix(minKey);</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;833</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;        <span class="keyword">this</span>.kvt.removeRange(minKey, maxKey);</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;834</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;835</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        <span class="comment">// Delete object schema version entry</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;836</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;        <span class="keyword">this</span>.kvt.remove(Database.buildVersionIndexKey(id, info.getVersion()));</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;837</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;    }</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;838</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;839</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="comment">/**</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;840</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * Determine if an object exists.</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;841</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;842</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * &lt;p&gt;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;843</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * This method does &lt;i&gt;not&lt;/i&gt; change the object's schema version if it exists</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;844</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * and has a different version that this transaction.</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;845</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * &lt;/p&gt;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;846</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;847</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @param id object ID of the object to find</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;848</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @return true if object was found, false if object was not found, or if {@code id} specifies an unknown object type</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;849</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @throws StaleTransactionException if this transaction is no longer usable</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;850</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @throws IllegalArgumentException if {@code id} is null</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;851</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     */</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;852</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="keyword">public</span> <span class="keyword">synchronized</span> <span class="keyword">boolean</span> exists(ObjId id) {</pre></td></tr>
<tr>  <td class="numLine">&nbsp;853</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        <span class="keyword">try</span> {</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;854</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;            <span class="keyword">this</span>.getObjectInfo(id, <span class="keyword">false</span>);</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;855</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;        } <span class="keyword">catch</span> (DeletedObjectException | UnknownTypeException e) {</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;856</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;            <span class="keyword">return</span> <span class="keyword">false</span>;</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;857</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;        }</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;858</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;        <span class="keyword">return</span> <span class="keyword">true</span>;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;859</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    }</pre></td></tr>
<tr>  <td class="numLine">&nbsp;860</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;861</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="comment">/**</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;862</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * Copy all of an object's fields onto a target object in a (possibly) different transaction, replacing any previous values.</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;863</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;864</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * &lt;p&gt;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;865</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * If necessary, {@code source} object is first upgraded to {@linkplain #getSchema() the schema version associated with</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;866</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * this transaction}, which must be identical in this transaction and {@code dest}.</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;867</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * &lt;/p&gt;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;868</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;869</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * &lt;p&gt;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;870</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * Only the object's fields are copied; any other objects they reference are not copied. If the {@code target} object</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;871</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * does not exist in {@code dest}, it will be created first (and {@link CreateListener}s notified); if {@code target}</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;872</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * does exist in {@code dest}, it's schema version will be upgraded if necessary to match {@code source} (and any registered</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;873</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * {@link VersionChangeListener}s notified).</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;874</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * (Meaningful) changes to {@code target}'s fields generate change listener notifications.</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;875</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * &lt;/p&gt;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;876</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;877</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * &lt;p&gt;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;878</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * Note: if two threads attempt to copy objects between the same two transactions at the same time but in opposite directions,</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;879</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * deadlock could result.</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;880</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * &lt;/p&gt;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;881</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;882</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * &lt;p&gt;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;883</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * If {@code dest} is this instance, and {@code source} equals {@code target}, no changes are made and false is returned.</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;884</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * &lt;/p&gt;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;885</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;886</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @param source object ID of the source object in this transaction</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;887</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @param target object ID of the target object in {@code dest}</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;888</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @param dest destination transaction containing {@code target} (possibly same as this transaction)</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;889</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @param updateVersion true to first automatically update the object's schema version, false to not change it</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;890</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @return false if object already existed in {@code dest}, true if {@code target} did not exist in {@code dest}</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;891</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @throws DeletedObjectException if no object with ID equal to {@code id} is found in this transaction</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;892</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @throws UnknownTypeException if {@code source} or {@code target} specifies an unknown object type</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;893</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @throws IllegalArgumentException if {@code source} and {@code target} specify different object types</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;894</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @throws IllegalArgumentException if any parameter is null</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;895</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @throws IllegalArgumentException if any {@code source} and {@code target} have different object types</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;896</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @throws ReadOnlyTransactionException if {@code dest} has been {@linkplain #setReadOnly set read-only}</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;897</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @throws StaleTransactionException if this transaction or {@code dest} is no longer usable</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;898</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @throws SchemaMismatchException if the schema version associated with {@code source} differs between</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;899</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *  this transaction and {@code dest}</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;900</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @throws TypeNotInSchemaVersionException {@code updateVersion} is true and the object could not be updated because</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;901</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *   the object's type does not exist in the schema version associated with this transaction</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;902</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     */</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;903</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="keyword">public</span> <span class="keyword">synchronized</span> <span class="keyword">boolean</span> copy(ObjId source, <span class="keyword">final</span> ObjId target, <span class="keyword">final</span> Transaction dest, <span class="keyword">final</span> <span class="keyword">boolean</span> updateVersion) {</pre></td></tr>
<tr>  <td class="numLine">&nbsp;904</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;905</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        <span class="comment">// Sanity check</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;906</td>  <td class="nbHitsUncovered"><a title="Line 906: Conditional coverage 0% (0/2).">&nbsp;0</a></td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;<a title="Line 906: Conditional coverage 0% (0/2).">        <span class="keyword">if</span> (source == <span class="keyword">null</span>)</a></span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;907</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;            <span class="keyword">throw</span> <span class="keyword">new</span> IllegalArgumentException(<span class="string">"null source"</span>);</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;908</td>  <td class="nbHitsUncovered"><a title="Line 908: Conditional coverage 0% (0/2).">&nbsp;0</a></td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;<a title="Line 908: Conditional coverage 0% (0/2).">        <span class="keyword">if</span> (target == <span class="keyword">null</span>)</a></span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;909</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;            <span class="keyword">throw</span> <span class="keyword">new</span> IllegalArgumentException(<span class="string">"null target"</span>);</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;910</td>  <td class="nbHitsUncovered"><a title="Line 910: Conditional coverage 0% (0/2).">&nbsp;0</a></td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;<a title="Line 910: Conditional coverage 0% (0/2).">        <span class="keyword">if</span> (dest == <span class="keyword">null</span>)</a></span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;911</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;            <span class="keyword">throw</span> <span class="keyword">new</span> IllegalArgumentException(<span class="string">"null dest"</span>);</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;912</td>  <td class="nbHitsUncovered"><a title="Line 912: Conditional coverage 0% (0/2).">&nbsp;0</a></td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;<a title="Line 912: Conditional coverage 0% (0/2).">        <span class="keyword">if</span> (<span class="keyword">this</span>.stale)</a></span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;913</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;            <span class="keyword">throw</span> <span class="keyword">new</span> StaleTransactionException(<span class="keyword">this</span>);</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;914</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;915</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        <span class="comment">// Do nothing if nothing to do</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;916</td>  <td class="nbHitsUncovered"><a title="Line 916: Conditional coverage 0% (0/4) [each condition: 0%, 0%].">&nbsp;0</a></td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;<a title="Line 916: Conditional coverage 0% (0/4) [each condition: 0%, 0%].">        <span class="keyword">if</span> (<span class="keyword">this</span> == dest &amp;&amp; source.equals(target))</a></span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;917</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;            <span class="keyword">return</span> <span class="keyword">false</span>;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;918</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;919</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        <span class="comment">// Get object info</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;920</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;        <span class="keyword">final</span> ObjInfo srcInfo = <span class="keyword">this</span>.getObjectInfo(source, updateVersion);</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;921</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;922</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        <span class="comment">// Do the copy while both transactions are locked</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;923</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;        <span class="keyword">synchronized</span> (dest) {</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;924</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;925</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;            <span class="comment">// Sanity check</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;926</td>  <td class="nbHitsUncovered"><a title="Line 926: Conditional coverage 0% (0/2).">&nbsp;0</a></td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;<a title="Line 926: Conditional coverage 0% (0/2).">            <span class="keyword">if</span> (dest.stale)</a></span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;927</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;                <span class="keyword">throw</span> <span class="keyword">new</span> StaleTransactionException(dest);</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;928</td>  <td class="nbHitsUncovered"><a title="Line 928: Conditional coverage 0% (0/2).">&nbsp;0</a></td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;<a title="Line 928: Conditional coverage 0% (0/2).">            <span class="keyword">if</span> (dest.readOnly)</a></span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;929</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;                <span class="keyword">throw</span> <span class="keyword">new</span> ReadOnlyTransactionException(dest);</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;930</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;931</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;            <span class="comment">// Copy fields</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;932</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;            <span class="keyword">return</span> dest.mutateAndNotify(<span class="keyword">new</span> Mutation&lt;Boolean&gt;() {</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;933</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;                @Override</pre></td></tr>
<tr>  <td class="numLine">&nbsp;934</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;                <span class="keyword">public</span> Boolean mutate() {</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;935</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;                    <span class="keyword">return</span> Transaction.doCopyFields(srcInfo, target, Transaction.<span class="keyword">this</span>, dest, updateVersion);</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;936</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;                }</pre></td></tr>
<tr>  <td class="numLine">&nbsp;937</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;            });</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;938</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;        }</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;939</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    }</pre></td></tr>
<tr>  <td class="numLine">&nbsp;940</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;941</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="comment">// This method assumes both transactions are locked</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;942</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="keyword">private</span> <span class="keyword">static</span> <span class="keyword">boolean</span> doCopyFields(ObjInfo srcInfo, ObjId dstId, Transaction srcTx, Transaction dstTx, <span class="keyword">boolean</span> updateVersion) {</pre></td></tr>
<tr>  <td class="numLine">&nbsp;943</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;944</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        <span class="comment">// Sanity check</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;945</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;        <span class="keyword">final</span> ObjId srcId = srcInfo.getId();</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;946</td>  <td class="nbHitsUncovered"><a title="Line 946: Conditional coverage 0% (0/4) [each condition: 0%, 0%].">&nbsp;0</a></td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;<a title="Line 946: Conditional coverage 0% (0/4) [each condition: 0%, 0%].">        <span class="keyword">if</span> (srcId.equals(dstId) &amp;&amp; srcTx == dstTx)</a></span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;947</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;            <span class="keyword">throw</span> <span class="keyword">new</span> RuntimeException(<span class="string">"internal error"</span>);</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;948</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;949</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        <span class="comment">// Verify objects have the same type</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;950</td>  <td class="nbHitsUncovered"><a title="Line 950: Conditional coverage 0% (0/2).">&nbsp;0</a></td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;<a title="Line 950: Conditional coverage 0% (0/2).">        <span class="keyword">if</span> (srcId.getStorageId() != dstId.getStorageId()) {</a></span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;951</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;            <span class="keyword">throw</span> <span class="keyword">new</span> IllegalArgumentException(<span class="string">"can't copy "</span> + srcId + <span class="string">" to "</span> + dstId</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;952</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;              + <span class="string">" due to non-equal object types ("</span> + srcId.getStorageId() + <span class="string">" != "</span> + dstId.getStorageId() + <span class="string">")"</span>);</pre></td></tr>
<tr>  <td class="numLine">&nbsp;953</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        }</pre></td></tr>
<tr>  <td class="numLine">&nbsp;954</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;955</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        <span class="comment">// Upgrade source object if necessary</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;956</td>  <td class="nbHitsUncovered"><a title="Line 956: Conditional coverage 0% (0/4) [each condition: 0%, 0%].">&nbsp;0</a></td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;<a title="Line 956: Conditional coverage 0% (0/4) [each condition: 0%, 0%].">        <span class="keyword">if</span> (updateVersion &amp;&amp; srcInfo.getVersion() != srcTx.schema.versionNumber) {</a></span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;957</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;            srcTx.updateVersion(srcInfo, srcTx.schema);</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;958</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;            srcInfo = <span class="keyword">new</span> ObjInfo(srcTx, srcId);</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;959</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        }</pre></td></tr>
<tr>  <td class="numLine">&nbsp;960</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;961</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        <span class="comment">// Find and verify source object's schema version in destination transaction</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;962</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;        <span class="keyword">final</span> <span class="keyword">int</span> objectVersion = srcInfo.getVersion();</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;963</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        <span class="keyword">final</span> Schema dstSchema;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;964</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        <span class="keyword">try</span> {</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;965</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;            dstSchema = dstTx.schemas.getVersion(objectVersion);</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;966</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;        } <span class="keyword">catch</span> (IllegalArgumentException e) {</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;967</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;            <span class="keyword">throw</span> <span class="keyword">new</span> SchemaMismatchException(<span class="string">"destination transaction has no schema version "</span> + objectVersion);</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;968</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;        }</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;969</td>  <td class="nbHitsUncovered"><a title="Line 969: Conditional coverage 0% (0/2).">&nbsp;0</a></td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;<a title="Line 969: Conditional coverage 0% (0/2).">        <span class="keyword">if</span> (!Arrays.equals(srcTx.schema.encodedXML, dstTx.schema.encodedXML))</a></span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;970</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;            <span class="keyword">throw</span> <span class="keyword">new</span> SchemaMismatchException(<span class="string">"destination transaction schema version "</span> + objectVersion + <span class="string">" does not match"</span>);</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;971</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;972</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        <span class="comment">// Create destination object if it doesn't already exist</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;973</td>  <td class="nbHitsUncovered"><a title="Line 973: Conditional coverage 0% (0/2).">&nbsp;0</a></td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;<a title="Line 973: Conditional coverage 0% (0/2).">        <span class="keyword">final</span> <span class="keyword">boolean</span> existed = !dstTx.create(dstId, objectVersion);</a></span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;974</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;        <span class="keyword">final</span> ObjInfo dstInfo = dstTx.getObjectInfo(dstId, <span class="keyword">false</span>);</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;975</td>  <td class="nbHitsUncovered"><a title="Line 975: Conditional coverage 0% (0/2).">&nbsp;0</a></td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;<a title="Line 975: Conditional coverage 0% (0/2).">        <span class="keyword">final</span> <span class="keyword">boolean</span> needUpgrade = dstInfo.getVersion() != objectVersion;      <span class="comment">// can only happen if object already existed</span></a></span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;976</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;977</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        <span class="comment">// Do field-by-field copy if there are change or version listeners, otherwise do fast copy of key/value pairs</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;978</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;        <span class="keyword">final</span> ObjType type = srcInfo.getObjType();</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;979</td>  <td class="nbHitsUncovered"><a title="Line 979: Conditional coverage 0% (0/6) [each condition: 0%, 0%, 0%].">&nbsp;0</a></td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;<a title="Line 979: Conditional coverage 0% (0/6) [each condition: 0%, 0%, 0%].">        <span class="keyword">if</span> (dstTx.hasFieldMonitor(type) || (needUpgrade &amp;&amp; !dstTx.versionChangeListeners.isEmpty())) {</a></span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;980</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;981</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;            <span class="comment">// Upgrade object first</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;982</td>  <td class="nbHitsUncovered"><a title="Line 982: Conditional coverage 0% (0/2).">&nbsp;0</a></td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;<a title="Line 982: Conditional coverage 0% (0/2).">            <span class="keyword">if</span> (needUpgrade)</a></span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;983</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;                dstTx.updateVersion(dstInfo, dstSchema);</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;984</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;985</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;            <span class="comment">// Copy fields</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;986</td>  <td class="nbHitsUncovered"><a title="Line 986: Conditional coverage 0% (0/2).">&nbsp;0</a></td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;<a title="Line 986: Conditional coverage 0% (0/2).">            <span class="keyword">for</span> (Field&lt;?&gt; field : type.fields.values())</a></span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;987</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;                field.copy(srcId, dstId, srcTx, dstTx);</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;988</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        } <span class="keyword">else</span> {</pre></td></tr>
<tr>  <td class="numLine">&nbsp;989</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;990</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;            <span class="comment">// Delete pre-existing object's field content, if any</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;991</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;            dstTx.deleteObjectData(dstInfo);</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;992</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;993</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;            <span class="comment">// Add schema version index entry</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;994</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;            dstTx.kvt.put(Database.buildVersionIndexKey(dstId, objectVersion), ByteUtil.EMPTY);</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;995</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;996</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;            <span class="comment">// Copy object meta-data and all field content in one key range sweep</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;997</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;            <span class="keyword">final</span> <span class="keyword">byte</span>[] srcMinKey = srcId.getBytes();</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;998</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;            <span class="keyword">final</span> <span class="keyword">byte</span>[] srcMaxKey = ByteUtil.getKeyAfterPrefix(srcMinKey);</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;999</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;            <span class="keyword">final</span> ByteWriter dstWriter = <span class="keyword">new</span> ByteWriter();</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1000</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;            dstWriter.write(dstId.getBytes());</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1001</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;            <span class="keyword">final</span> <span class="keyword">int</span> dstMark = dstWriter.mark();</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1002</td>  <td class="nbHitsUncovered"><a title="Line 1002: Conditional coverage 0% (0/2).">&nbsp;0</a></td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;<a title="Line 1002: Conditional coverage 0% (0/2).">            <span class="keyword">for</span> (Iterator&lt;KVPair&gt; i = srcTx.kvt.getRange(srcMinKey, srcMaxKey, <span class="keyword">false</span>); i.hasNext(); ) {</a></span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1003</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;                <span class="keyword">final</span> KVPair kv = i.next();</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1004</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;                <span class="keyword">final</span> ByteReader srcReader = <span class="keyword">new</span> ByteReader(kv.getKey());</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1005</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;                srcReader.skip(srcMinKey.length);</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1006</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;                dstWriter.reset(dstMark);</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1007</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;                dstWriter.write(srcReader);</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1008</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;                dstTx.kvt.put(dstWriter.getBytes(), kv.getValue());</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1009</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;            }</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1010</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;1011</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;            <span class="comment">// Create object's simple field index entries</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1012</td>  <td class="nbHitsUncovered"><a title="Line 1012: Conditional coverage 0% (0/2).">&nbsp;0</a></td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;<a title="Line 1012: Conditional coverage 0% (0/2).">            <span class="keyword">for</span> (SimpleField&lt;?&gt; field : type.simpleFields.values()) {</a></span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1013</td>  <td class="nbHitsUncovered"><a title="Line 1013: Conditional coverage 0% (0/2).">&nbsp;0</a></td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;<a title="Line 1013: Conditional coverage 0% (0/2).">                <span class="keyword">if</span> (field.indexed) {</a></span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1014</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;                    <span class="keyword">final</span> <span class="keyword">byte</span>[] fieldValue = dstTx.kvt.get(field.buildKey(dstId));     <span class="comment">// can be null (if field has default value)</span></span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1015</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;                    <span class="keyword">final</span> <span class="keyword">byte</span>[] indexKey = Transaction.buildSimpleIndexEntry(field, dstId, fieldValue);</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1016</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;                    dstTx.kvt.put(indexKey, ByteUtil.EMPTY);</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1017</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;                }</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1018</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;            }</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1019</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;1020</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;            <span class="comment">// Create object's composite index entries</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1021</td>  <td class="nbHitsUncovered"><a title="Line 1021: Conditional coverage 0% (0/2).">&nbsp;0</a></td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;<a title="Line 1021: Conditional coverage 0% (0/2).">            <span class="keyword">for</span> (CompositeIndex index : type.compositeIndexes.values())</a></span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1022</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;                dstTx.kvt.put(Transaction.buildCompositeIndexEntry(dstTx, dstId, index), ByteUtil.EMPTY);</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1023</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;1024</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;            <span class="comment">// Create object's complex field index entries</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1025</td>  <td class="nbHitsUncovered"><a title="Line 1025: Conditional coverage 0% (0/2).">&nbsp;0</a></td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;<a title="Line 1025: Conditional coverage 0% (0/2).">            <span class="keyword">for</span> (ComplexField&lt;?&gt; field : type.complexFields.values()) {</a></span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1026</td>  <td class="nbHitsUncovered"><a title="Line 1026: Conditional coverage 0% (0/2).">&nbsp;0</a></td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;<a title="Line 1026: Conditional coverage 0% (0/2).">                <span class="keyword">for</span> (SimpleField&lt;?&gt; subField : field.getSubFields()) {</a></span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1027</td>  <td class="nbHitsUncovered"><a title="Line 1027: Conditional coverage 0% (0/2).">&nbsp;0</a></td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;<a title="Line 1027: Conditional coverage 0% (0/2).">                    <span class="keyword">if</span> (subField.indexed)</a></span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1028</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;                        field.addIndexEntries(dstTx, dstId, subField);</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1029</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;                }</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1030</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;            }</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1031</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        }</pre></td></tr>
<tr>  <td class="numLine">&nbsp;1032</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;1033</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        <span class="comment">// Done</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1034</td>  <td class="nbHitsUncovered"><a title="Line 1034: Conditional coverage 0% (0/2).">&nbsp;0</a></td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;<a title="Line 1034: Conditional coverage 0% (0/2).">        <span class="keyword">return</span> !existed;</a></span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1035</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    }</pre></td></tr>
<tr>  <td class="numLine">&nbsp;1036</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;1037</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="comment">/**</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1038</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * Add a {@link CreateListener} to this transaction.</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1039</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1040</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @param listener the listener to add</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1041</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @throws IllegalArgumentException if {@code listener} is null</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1042</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @throws StaleTransactionException if this transaction is no longer usable</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1043</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     */</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1044</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="keyword">public</span> <span class="keyword">synchronized</span> <span class="keyword">void</span> addCreateListener(CreateListener listener) {</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1045</td>  <td class="nbHitsUncovered"><a title="Line 1045: Conditional coverage 0% (0/2).">&nbsp;0</a></td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;<a title="Line 1045: Conditional coverage 0% (0/2).">        <span class="keyword">if</span> (<span class="keyword">this</span>.stale)</a></span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1046</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;            <span class="keyword">throw</span> <span class="keyword">new</span> StaleTransactionException(<span class="keyword">this</span>);</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1047</td>  <td class="nbHitsUncovered"><a title="Line 1047: Conditional coverage 0% (0/2).">&nbsp;0</a></td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;<a title="Line 1047: Conditional coverage 0% (0/2).">        <span class="keyword">if</span> (listener == <span class="keyword">null</span>)</a></span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1048</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;            <span class="keyword">throw</span> <span class="keyword">new</span> IllegalArgumentException(<span class="string">"null listener"</span>);</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1049</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;        <span class="keyword">this</span>.createListeners.add(listener);</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1050</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;    }</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1051</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;1052</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="comment">/**</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1053</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * Remove an {@link CreateListener} from this transaction.</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1054</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1055</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @param listener the listener to remove</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1056</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @throws StaleTransactionException if this transaction is no longer usable</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1057</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @throws IllegalArgumentException if {@code listener} is null</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1058</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     */</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1059</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="keyword">public</span> <span class="keyword">synchronized</span> <span class="keyword">void</span> removeCreateListener(CreateListener listener) {</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1060</td>  <td class="nbHitsUncovered"><a title="Line 1060: Conditional coverage 0% (0/2).">&nbsp;0</a></td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;<a title="Line 1060: Conditional coverage 0% (0/2).">        <span class="keyword">if</span> (<span class="keyword">this</span>.stale)</a></span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1061</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;            <span class="keyword">throw</span> <span class="keyword">new</span> StaleTransactionException(<span class="keyword">this</span>);</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1062</td>  <td class="nbHitsUncovered"><a title="Line 1062: Conditional coverage 0% (0/2).">&nbsp;0</a></td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;<a title="Line 1062: Conditional coverage 0% (0/2).">        <span class="keyword">if</span> (listener == <span class="keyword">null</span>)</a></span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1063</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;            <span class="keyword">throw</span> <span class="keyword">new</span> IllegalArgumentException(<span class="string">"null listener"</span>);</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1064</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;        <span class="keyword">this</span>.createListeners.remove(listener);</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1065</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;    }</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1066</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;1067</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="comment">/**</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1068</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * Add a {@link DeleteListener} to this transaction.</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1069</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1070</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @param listener the listener to add</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1071</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @throws IllegalArgumentException if {@code listener} is null</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1072</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @throws StaleTransactionException if this transaction is no longer usable</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1073</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     */</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1074</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="keyword">public</span> <span class="keyword">synchronized</span> <span class="keyword">void</span> addDeleteListener(DeleteListener listener) {</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1075</td>  <td class="nbHitsUncovered"><a title="Line 1075: Conditional coverage 0% (0/2).">&nbsp;0</a></td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;<a title="Line 1075: Conditional coverage 0% (0/2).">        <span class="keyword">if</span> (<span class="keyword">this</span>.stale)</a></span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1076</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;            <span class="keyword">throw</span> <span class="keyword">new</span> StaleTransactionException(<span class="keyword">this</span>);</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1077</td>  <td class="nbHitsUncovered"><a title="Line 1077: Conditional coverage 0% (0/2).">&nbsp;0</a></td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;<a title="Line 1077: Conditional coverage 0% (0/2).">        <span class="keyword">if</span> (listener == <span class="keyword">null</span>)</a></span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1078</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;            <span class="keyword">throw</span> <span class="keyword">new</span> IllegalArgumentException(<span class="string">"null listener"</span>);</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1079</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;        <span class="keyword">this</span>.deleteListeners.add(listener);</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1080</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;    }</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1081</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;1082</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="comment">/**</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1083</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * Remove an {@link DeleteListener} from this transaction.</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1084</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1085</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @param listener the listener to remove</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1086</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @throws StaleTransactionException if this transaction is no longer usable</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1087</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @throws IllegalArgumentException if {@code listener} is null</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1088</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     */</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1089</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="keyword">public</span> <span class="keyword">synchronized</span> <span class="keyword">void</span> removeDeleteListener(DeleteListener listener) {</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1090</td>  <td class="nbHitsUncovered"><a title="Line 1090: Conditional coverage 0% (0/2).">&nbsp;0</a></td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;<a title="Line 1090: Conditional coverage 0% (0/2).">        <span class="keyword">if</span> (<span class="keyword">this</span>.stale)</a></span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1091</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;            <span class="keyword">throw</span> <span class="keyword">new</span> StaleTransactionException(<span class="keyword">this</span>);</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1092</td>  <td class="nbHitsUncovered"><a title="Line 1092: Conditional coverage 0% (0/2).">&nbsp;0</a></td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;<a title="Line 1092: Conditional coverage 0% (0/2).">        <span class="keyword">if</span> (listener == <span class="keyword">null</span>)</a></span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1093</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;            <span class="keyword">throw</span> <span class="keyword">new</span> IllegalArgumentException(<span class="string">"null listener"</span>);</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1094</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;        <span class="keyword">this</span>.deleteListeners.remove(listener);</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1095</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;    }</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1096</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;1097</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">// Object Versioning</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1098</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;1099</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="comment">/**</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1100</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * Read the current schema version of the given object. Does not change the object's version.</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1101</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1102</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @param id object id</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1103</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @return object's current schema version</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1104</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @throws DeletedObjectException if no object with ID equal to {@code id} is found</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1105</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @throws UnknownTypeException if {@code id} specifies an unknown object type</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1106</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @throws StaleTransactionException if this transaction is no longer usable</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1107</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @throws IllegalArgumentException if {@code id} is null</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1108</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     */</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1109</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="keyword">public</span> <span class="keyword">synchronized</span> <span class="keyword">int</span> getSchemaVersion(ObjId id) {</pre></td></tr>
<tr>  <td class="numLine">&nbsp;1110</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;1111</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        <span class="comment">// Sanity check</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1112</td>  <td class="nbHitsUncovered"><a title="Line 1112: Conditional coverage 0% (0/2).">&nbsp;0</a></td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;<a title="Line 1112: Conditional coverage 0% (0/2).">        <span class="keyword">if</span> (<span class="keyword">this</span>.stale)</a></span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1113</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;            <span class="keyword">throw</span> <span class="keyword">new</span> StaleTransactionException(<span class="keyword">this</span>);</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1114</td>  <td class="nbHitsUncovered"><a title="Line 1114: Conditional coverage 0% (0/2).">&nbsp;0</a></td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;<a title="Line 1114: Conditional coverage 0% (0/2).">        <span class="keyword">if</span> (id == <span class="keyword">null</span>)</a></span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1115</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;            <span class="keyword">throw</span> <span class="keyword">new</span> IllegalArgumentException(<span class="string">"null id"</span>);</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1116</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;1117</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        <span class="comment">// Get object version</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1118</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;        <span class="keyword">return</span> <span class="keyword">this</span>.getObjectInfo(id, <span class="keyword">false</span>).getVersion();</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1119</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    }</pre></td></tr>
<tr>  <td class="numLine">&nbsp;1120</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;1121</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="comment">/**</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1122</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * Change the schema version of the specified object, if necessary, so that its version matches</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1123</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * {@linkplain #getSchema() the schema version associated with this transaction}.</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1124</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1125</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * &lt;p&gt;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1126</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * If a schema change occurs, any registered {@link VersionChangeListener}s will be notified prior</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1127</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * to this method returning.</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1128</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * &lt;/p&gt;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1129</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1130</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @param id object ID of the object to delete</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1131</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @return true if the object schema version was changed, otherwise false</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1132</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @throws StaleTransactionException if this transaction is no longer usable</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1133</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @throws ReadOnlyTransactionException if this transaction has been {@linkplain #setReadOnly set read-only}</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1134</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @throws DeletedObjectException if no object with ID equal to {@code id} is found</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1135</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @throws UnknownTypeException if {@code id} specifies an unknown object type</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1136</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @throws IllegalArgumentException if {@code id} is null</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1137</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @throws TypeNotInSchemaVersionException if the object version could not be updated because the object's type</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1138</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *   does not exist in the schema version associated with this transaction</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1139</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @see #getSchemaVersion(ObjId)</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1140</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     */</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1141</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="keyword">public</span> <span class="keyword">synchronized</span> <span class="keyword">boolean</span> updateSchemaVersion(ObjId id) {</pre></td></tr>
<tr>  <td class="numLine">&nbsp;1142</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;1143</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        <span class="comment">// Sanity check</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1144</td>  <td class="nbHitsUncovered"><a title="Line 1144: Conditional coverage 0% (0/2).">&nbsp;0</a></td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;<a title="Line 1144: Conditional coverage 0% (0/2).">        <span class="keyword">if</span> (id == <span class="keyword">null</span>)</a></span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1145</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;            <span class="keyword">throw</span> <span class="keyword">new</span> IllegalArgumentException(<span class="string">"null id"</span>);</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1146</td>  <td class="nbHitsUncovered"><a title="Line 1146: Conditional coverage 0% (0/2).">&nbsp;0</a></td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;<a title="Line 1146: Conditional coverage 0% (0/2).">        <span class="keyword">if</span> (<span class="keyword">this</span>.stale)</a></span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1147</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;            <span class="keyword">throw</span> <span class="keyword">new</span> StaleTransactionException(<span class="keyword">this</span>);</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1148</td>  <td class="nbHitsUncovered"><a title="Line 1148: Conditional coverage 0% (0/2).">&nbsp;0</a></td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;<a title="Line 1148: Conditional coverage 0% (0/2).">        <span class="keyword">if</span> (<span class="keyword">this</span>.readOnly)</a></span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1149</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;            <span class="keyword">throw</span> <span class="keyword">new</span> ReadOnlyTransactionException(<span class="keyword">this</span>);</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1150</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;1151</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        <span class="comment">// Get object info</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1152</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;        <span class="keyword">final</span> ObjInfo info = <span class="keyword">this</span>.getObjectInfo(id, <span class="keyword">false</span>);</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1153</td>  <td class="nbHitsUncovered"><a title="Line 1153: Conditional coverage 0% (0/2).">&nbsp;0</a></td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;<a title="Line 1153: Conditional coverage 0% (0/2).">        <span class="keyword">if</span> (info.getVersion() == <span class="keyword">this</span>.schema.versionNumber)</a></span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1154</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;            <span class="keyword">return</span> <span class="keyword">false</span>;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1155</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;1156</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        <span class="comment">// Update schema version</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1157</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;        <span class="keyword">this</span>.mutateAndNotify(<span class="keyword">new</span> Mutation&lt;Void&gt;() {</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1158</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;            @Override</pre></td></tr>
<tr>  <td class="numLine">&nbsp;1159</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;            <span class="keyword">public</span> Void mutate() {</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1160</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;                Transaction.<span class="keyword">this</span>.updateVersion(info, Transaction.<span class="keyword">this</span>.schema);</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1161</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;                <span class="keyword">return</span> <span class="keyword">null</span>;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1162</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;            }</pre></td></tr>
<tr>  <td class="numLine">&nbsp;1163</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        });</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1164</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;        <span class="keyword">return</span> <span class="keyword">true</span>;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1165</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    }</pre></td></tr>
<tr>  <td class="numLine">&nbsp;1166</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;1167</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="comment">/**</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1168</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * Update object to the current schema version.</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1169</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1170</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @param info original object info</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1171</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @param targetVersion version to change to</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1172</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     */</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1173</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="keyword">private</span> <span class="keyword">synchronized</span> <span class="keyword">void</span> updateVersion(<span class="keyword">final</span> ObjInfo info, <span class="keyword">final</span> Schema targetVersion) {</pre></td></tr>
<tr>  <td class="numLine">&nbsp;1174</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;1175</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        <span class="comment">// Get version numbers</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1176</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;        <span class="keyword">final</span> ObjId id = info.getId();</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1177</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;        <span class="keyword">final</span> <span class="keyword">int</span> oldVersion = info.getVersion();</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1178</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;        <span class="keyword">final</span> <span class="keyword">int</span> newVersion = targetVersion.versionNumber;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1179</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;1180</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        <span class="comment">// Sanity check</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1181</td>  <td class="nbHitsUncovered"><a title="Line 1181: Conditional coverage 0% (0/4) [each condition: 0%, 0%].">&nbsp;0</a></td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;<a title="Line 1181: Conditional coverage 0% (0/4) [each condition: 0%, 0%].">        <span class="keyword">assert</span> <span class="keyword">this</span>.schemas.getVersion(targetVersion.versionNumber) == targetVersion;</a></span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1182</td>  <td class="nbHitsUncovered"><a title="Line 1182: Conditional coverage 0% (0/2).">&nbsp;0</a></td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;<a title="Line 1182: Conditional coverage 0% (0/2).">        <span class="keyword">if</span> (newVersion == oldVersion)</a></span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1183</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;            <span class="keyword">throw</span> <span class="keyword">new</span> IllegalArgumentException(<span class="string">"object already at version "</span> + newVersion);</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1184</td>  <td class="nbHitsUncovered"><a title="Line 1184: Conditional coverage 0% (0/2).">&nbsp;0</a></td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;<a title="Line 1184: Conditional coverage 0% (0/2).">        <span class="keyword">if</span> (<span class="keyword">this</span>.readOnly)</a></span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1185</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;            <span class="keyword">throw</span> <span class="keyword">new</span> ReadOnlyTransactionException(<span class="keyword">this</span>);</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1186</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;1187</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        <span class="comment">// Get old and new types</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1188</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;        <span class="keyword">final</span> ObjType oldType = info.getObjType();</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1189</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        <span class="keyword">final</span> ObjType newType;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;1190</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        <span class="keyword">try</span> {</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1191</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;            newType = targetVersion.getObjType(id.getStorageId());</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1192</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;        } <span class="keyword">catch</span> (UnknownTypeException e) {</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1193</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;            <span class="keyword">throw</span> (TypeNotInSchemaVersionException)<span class="keyword">new</span> TypeNotInSchemaVersionException(id, newVersion).initCause(e);</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1194</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;        }</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1195</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;1196</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        <span class="comment">// Gather removed fields' values here for user migration if any VersionChangeListeners are registered</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1197</td>  <td class="nbHitsUncovered"><a title="Line 1197: Conditional coverage 0% (0/2).">&nbsp;0</a></td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;<a title="Line 1197: Conditional coverage 0% (0/2).">        <span class="keyword">final</span> TreeMap&lt;Integer, Object&gt; oldValueMap = !<span class="keyword">this</span>.versionChangeListeners.isEmpty() ?</a></span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1198</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;          <span class="keyword">new</span> TreeMap&lt;Integer, Object&gt;() : <span class="keyword">null</span>;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;1199</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;1200</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="comment">//////// Remove the index entries corresponding to removed composite indexes</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1201</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;1202</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        <span class="comment">// Get composite index storage IDs (old or new)</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1203</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;        <span class="keyword">final</span> TreeSet&lt;Integer&gt; compositeIndexStorageIds = <span class="keyword">new</span> TreeSet&lt;&gt;();</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1204</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;        compositeIndexStorageIds.addAll(oldType.compositeIndexes.keySet());</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1205</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;        compositeIndexStorageIds.addAll(newType.compositeIndexes.keySet());</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1206</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;1207</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        <span class="comment">// Remove index entries for composite indexes that are going away</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1208</td>  <td class="nbHitsUncovered"><a title="Line 1208: Conditional coverage 0% (0/2).">&nbsp;0</a></td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;<a title="Line 1208: Conditional coverage 0% (0/2).">        <span class="keyword">for</span> (CompositeIndex index : oldType.compositeIndexes.values()) {</a></span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1209</td>  <td class="nbHitsUncovered"><a title="Line 1209: Conditional coverage 0% (0/2).">&nbsp;0</a></td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;<a title="Line 1209: Conditional coverage 0% (0/2).">            <span class="keyword">if</span> (!newType.compositeIndexes.containsKey(index.storageId))</a></span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1210</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;                <span class="keyword">this</span>.kvt.remove(<span class="keyword">this</span>.buildCompositeIndexEntry(id, index));</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1211</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;        }</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1212</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;1213</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="comment">//////// Update counter fields</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1214</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;1215</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        <span class="comment">// Get counter field storage IDs (old or new)</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1216</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;        <span class="keyword">final</span> TreeSet&lt;Integer&gt; counterFieldStorageIds = <span class="keyword">new</span> TreeSet&lt;&gt;();</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1217</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;        counterFieldStorageIds.addAll(oldType.counterFields.keySet());</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1218</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;        counterFieldStorageIds.addAll(newType.counterFields.keySet());</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1219</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;1220</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        <span class="comment">// Update counter fields</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1221</td>  <td class="nbHitsUncovered"><a title="Line 1221: Conditional coverage 0% (0/2).">&nbsp;0</a></td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;<a title="Line 1221: Conditional coverage 0% (0/2).">        <span class="keyword">for</span> (<span class="keyword">int</span> storageId : counterFieldStorageIds) {</a></span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1222</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;1223</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;            <span class="comment">// Get old and new counter fields having this storage ID</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1224</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;            <span class="keyword">final</span> CounterField oldField = oldType.counterFields.get(storageId);</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1225</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;            <span class="keyword">final</span> CounterField newField = newType.counterFields.get(storageId);</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1226</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;1227</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;            <span class="comment">// Save old field values for version change notification</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1228</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;            <span class="keyword">final</span> <span class="keyword">byte</span>[] key = Field.buildKey(id, storageId);</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1229</td>  <td class="nbHitsUncovered"><a title="Line 1229: Conditional coverage 0% (0/4) [each condition: 0%, 0%].">&nbsp;0</a></td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;<a title="Line 1229: Conditional coverage 0% (0/4) [each condition: 0%, 0%].">            <span class="keyword">if</span> (oldField != <span class="keyword">null</span> &amp;&amp; oldValueMap != <span class="keyword">null</span>) {</a></span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1230</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;                <span class="keyword">final</span> <span class="keyword">byte</span>[] oldValue = <span class="keyword">this</span>.kvt.get(key);</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1231</td>  <td class="nbHitsUncovered"><a title="Line 1231: Conditional coverage 0% (0/2).">&nbsp;0</a></td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;<a title="Line 1231: Conditional coverage 0% (0/2).">                <span class="keyword">final</span> <span class="keyword">long</span> value = oldValue != <span class="keyword">null</span> ? <span class="keyword">this</span>.kvt.decodeCounter(oldValue) : 0;</a></span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1232</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;                oldValueMap.put(storageId, value);</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1233</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;            }</pre></td></tr>
<tr>  <td class="numLine">&nbsp;1234</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;1235</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;            <span class="comment">// Remove old value if field has disappeared, otherwise leave alone</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1236</td>  <td class="nbHitsUncovered"><a title="Line 1236: Conditional coverage 0% (0/2).">&nbsp;0</a></td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;<a title="Line 1236: Conditional coverage 0% (0/2).">            <span class="keyword">if</span> (newField == <span class="keyword">null</span>)</a></span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1237</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;                <span class="keyword">this</span>.kvt.remove(key);</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1238</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;        }</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1239</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;1240</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="comment">//////// Update simple fields and corresponding index entries</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1241</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;1242</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        <span class="comment">// Get simple field storage IDs (old or new)</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1243</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;        <span class="keyword">final</span> TreeSet&lt;Integer&gt; simpleFieldStorageIds = <span class="keyword">new</span> TreeSet&lt;&gt;();</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1244</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;        simpleFieldStorageIds.addAll(oldType.simpleFields.keySet());</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1245</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;        simpleFieldStorageIds.addAll(newType.simpleFields.keySet());</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1246</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;1247</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        <span class="comment">// Update simple fields</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1248</td>  <td class="nbHitsUncovered"><a title="Line 1248: Conditional coverage 0% (0/2).">&nbsp;0</a></td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;<a title="Line 1248: Conditional coverage 0% (0/2).">        <span class="keyword">for</span> (<span class="keyword">int</span> storageId : simpleFieldStorageIds) {</a></span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1249</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;1250</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;            <span class="comment">// Get old and new simple fields having this storage ID</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1251</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;            <span class="keyword">final</span> SimpleField&lt;?&gt; oldField = oldType.simpleFields.get(storageId);</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1252</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;            <span class="keyword">final</span> SimpleField&lt;?&gt; newField = newType.simpleFields.get(storageId);</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1253</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;1254</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;            <span class="comment">// Save old field values for version change notification</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1255</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;            <span class="keyword">final</span> <span class="keyword">byte</span>[] key = Field.buildKey(id, storageId);</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1256</td>  <td class="nbHitsUncovered"><a title="Line 1256: Conditional coverage 0% (0/2).">&nbsp;0</a></td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;<a title="Line 1256: Conditional coverage 0% (0/2).">            <span class="keyword">final</span> <span class="keyword">byte</span>[] oldValue = oldField != <span class="keyword">null</span> ? <span class="keyword">this</span>.kvt.get(key) : <span class="keyword">null</span>;</a></span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1257</td>  <td class="nbHitsUncovered"><a title="Line 1257: Conditional coverage 0% (0/4) [each condition: 0%, 0%].">&nbsp;0</a></td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;<a title="Line 1257: Conditional coverage 0% (0/4) [each condition: 0%, 0%].">            <span class="keyword">if</span> (oldField != <span class="keyword">null</span> &amp;&amp; oldValueMap != <span class="keyword">null</span>) {</a></span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1258</td>  <td class="nbHitsUncovered"><a title="Line 1258: Conditional coverage 0% (0/2).">&nbsp;0</a></td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;<a title="Line 1258: Conditional coverage 0% (0/2).">                <span class="keyword">final</span> <span class="keyword">byte</span>[] bytes = oldValue != <span class="keyword">null</span> ? oldValue : oldField.fieldType.getDefaultValue();</a></span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1259</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;                <span class="keyword">final</span> Object value = oldField.fieldType.read(<span class="keyword">new</span> ByteReader(bytes));</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1260</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;                oldValueMap.put(storageId, value);</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1261</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;            }</pre></td></tr>
<tr>  <td class="numLine">&nbsp;1262</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;1263</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;            <span class="comment">// If field is being removed, discard the old value</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1264</td>  <td class="nbHitsUncovered"><a title="Line 1264: Conditional coverage 0% (0/4) [each condition: 0%, 0%].">&nbsp;0</a></td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;<a title="Line 1264: Conditional coverage 0% (0/4) [each condition: 0%, 0%].">            <span class="keyword">if</span> (newField == <span class="keyword">null</span> &amp;&amp; oldValue != <span class="keyword">null</span>)</a></span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1265</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;                <span class="keyword">this</span>.kvt.remove(key);</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1266</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;1267</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;            <span class="comment">// Remove old index entry if index removed in new version</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1268</td>  <td class="nbHitsUncovered"><a title="Line 1268: Conditional coverage 0% (0/8) [each condition: 0%, 0%, 0%, 0%].">&nbsp;0</a></td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;<a title="Line 1268: Conditional coverage 0% (0/8) [each condition: 0%, 0%, 0%, 0%].">            <span class="keyword">if</span> (oldField != <span class="keyword">null</span> &amp;&amp; oldField.indexed &amp;&amp; (newField == <span class="keyword">null</span> || !newField.indexed))</a></span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1269</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;                <span class="keyword">this</span>.kvt.remove(Transaction.buildSimpleIndexEntry(oldField, id, oldValue));</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1270</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;1271</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;            <span class="comment">// Add new index entry if index added in new version</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1272</td>  <td class="nbHitsUncovered"><a title="Line 1272: Conditional coverage 0% (0/8) [each condition: 0%, 0%, 0%, 0%].">&nbsp;0</a></td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;<a title="Line 1272: Conditional coverage 0% (0/8) [each condition: 0%, 0%, 0%, 0%].">            <span class="keyword">if</span> (newField != <span class="keyword">null</span> &amp;&amp; newField.indexed &amp;&amp; (oldField == <span class="keyword">null</span> || !oldField.indexed))</a></span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1273</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;                <span class="keyword">this</span>.kvt.put(Transaction.buildSimpleIndexEntry(newField, id, oldValue), ByteUtil.EMPTY);</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1274</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;        }</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1275</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;1276</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="comment">//////// Add composite index entries for newly added composite indexes</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1277</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;1278</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        <span class="comment">// Add index entries for composite indexes that are newly added</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1279</td>  <td class="nbHitsUncovered"><a title="Line 1279: Conditional coverage 0% (0/2).">&nbsp;0</a></td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;<a title="Line 1279: Conditional coverage 0% (0/2).">        <span class="keyword">for</span> (CompositeIndex index : newType.compositeIndexes.values()) {</a></span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1280</td>  <td class="nbHitsUncovered"><a title="Line 1280: Conditional coverage 0% (0/2).">&nbsp;0</a></td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;<a title="Line 1280: Conditional coverage 0% (0/2).">            <span class="keyword">if</span> (!oldType.compositeIndexes.containsKey(index.storageId))</a></span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1281</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;                <span class="keyword">this</span>.kvt.put(<span class="keyword">this</span>.buildCompositeIndexEntry(id, index), ByteUtil.EMPTY);</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1282</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;        }</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1283</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;1284</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="comment">//////// Update complex fields and corresponding index entries</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1285</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;1286</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        <span class="comment">// Get complex field storage IDs (old or new)</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1287</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;        <span class="keyword">final</span> TreeSet&lt;Integer&gt; complexFieldStorageIds = <span class="keyword">new</span> TreeSet&lt;&gt;();</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1288</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;        complexFieldStorageIds.addAll(oldType.complexFields.keySet());</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1289</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;        complexFieldStorageIds.addAll(newType.complexFields.keySet());</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1290</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;1291</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        <span class="comment">// Notes:</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1292</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        <span class="comment">//</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1293</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        <span class="comment">// - The only changes we support are sub-field changes that don't affect the corresponding StorageInfo's</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1294</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        <span class="comment">// - New complex fields do not need to be explicitly initialized because their initial state is to have zero KV pairs</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1295</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        <span class="comment">//</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1296</td>  <td class="nbHitsUncovered"><a title="Line 1296: Conditional coverage 0% (0/2).">&nbsp;0</a></td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;<a title="Line 1296: Conditional coverage 0% (0/2).">        <span class="keyword">for</span> (<span class="keyword">int</span> storageId : complexFieldStorageIds) {</a></span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1297</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;1298</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;            <span class="comment">// Get old and new complex fields having this storage ID</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1299</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;            <span class="keyword">final</span> ComplexField&lt;?&gt; oldField = oldType.complexFields.get(storageId);</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1300</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;            <span class="keyword">final</span> ComplexField&lt;?&gt; newField = newType.complexFields.get(storageId);</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1301</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;1302</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;            <span class="comment">// If there is no old field, new field and any associated indexes are already initialized (i.e., they're empty)</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1303</td>  <td class="nbHitsUncovered"><a title="Line 1303: Conditional coverage 0% (0/2).">&nbsp;0</a></td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;<a title="Line 1303: Conditional coverage 0% (0/2).">            <span class="keyword">if</span> (oldField == <span class="keyword">null</span>)</a></span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1304</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;                <span class="keyword">continue</span>;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1305</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;1306</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;            <span class="comment">// Save old field's value</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1307</td>  <td class="nbHitsUncovered"><a title="Line 1307: Conditional coverage 0% (0/4) [each condition: 0%, 0%].">&nbsp;0</a></td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;<a title="Line 1307: Conditional coverage 0% (0/4) [each condition: 0%, 0%].">            <span class="keyword">if</span> (oldField != <span class="keyword">null</span> &amp;&amp; oldValueMap != <span class="keyword">null</span>)</a></span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1308</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;                oldValueMap.put(storageId, oldField.getValueReadOnlyCopy(<span class="keyword">this</span>, id));</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1309</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;1310</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;            <span class="comment">// If field is being removed, delete old field content, otherwise check if index entries should be added/removed</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1311</td>  <td class="nbHitsUncovered"><a title="Line 1311: Conditional coverage 0% (0/2).">&nbsp;0</a></td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;<a title="Line 1311: Conditional coverage 0% (0/2).">            <span class="keyword">if</span> (newField == <span class="keyword">null</span>) {</a></span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1312</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;                oldField.removeIndexEntries(<span class="keyword">this</span>, id);</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1313</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;                oldField.deleteContent(<span class="keyword">this</span>, id);</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1314</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;            } <span class="keyword">else</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1315</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;                newField.updateSubFieldIndexes(<span class="keyword">this</span>, oldField, id);</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1316</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;        }</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1317</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;1318</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="comment">//////// Remove references that are no longer valid</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1319</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;1320</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        <span class="comment">// Unreference any reference fields that refer to no-longer-valid object types</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1321</td>  <td class="nbHitsUncovered"><a title="Line 1321: Conditional coverage 0% (0/2).">&nbsp;0</a></td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;<a title="Line 1321: Conditional coverage 0% (0/2).">        <span class="keyword">for</span> (<span class="keyword">int</span> storageId : simpleFieldStorageIds) {</a></span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1322</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;1323</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;            <span class="comment">// Get storage IDs that are no longer allowed, if any</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1324</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;            <span class="keyword">final</span> TreeSet&lt;Integer&gt; removedObjectTypes = <span class="keyword">this</span>.findRemovedObjectTypes(info, targetVersion, storageId);</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1325</td>  <td class="nbHitsUncovered"><a title="Line 1325: Conditional coverage 0% (0/2).">&nbsp;0</a></td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;<a title="Line 1325: Conditional coverage 0% (0/2).">            <span class="keyword">if</span> (removedObjectTypes == <span class="keyword">null</span>)</a></span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1326</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;                <span class="keyword">continue</span>;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1327</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;1328</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;            <span class="comment">// Unreference field if needed</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1329</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;            <span class="keyword">final</span> ReferenceField oldField = (ReferenceField)oldType.simpleFields.get(storageId);</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1330</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;            <span class="keyword">final</span> ObjId ref = oldField.getValue(<span class="keyword">this</span>, id);</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1331</td>  <td class="nbHitsUncovered"><a title="Line 1331: Conditional coverage 0% (0/4) [each condition: 0%, 0%].">&nbsp;0</a></td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;<a title="Line 1331: Conditional coverage 0% (0/4) [each condition: 0%, 0%].">            <span class="keyword">if</span> (ref != <span class="keyword">null</span> &amp;&amp; removedObjectTypes.contains(ref.getStorageId()))</a></span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1332</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;                <span class="keyword">this</span>.writeSimpleField(id, oldField.storageId, <span class="keyword">null</span>, <span class="keyword">false</span>);</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1333</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;        }</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1334</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;1335</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        <span class="comment">// Unreference any reference sub-fields of complex fields that refer to no-longer-valid object types</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1336</td>  <td class="nbHitsUncovered"><a title="Line 1336: Conditional coverage 0% (0/2).">&nbsp;0</a></td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;<a title="Line 1336: Conditional coverage 0% (0/2).">        <span class="keyword">for</span> (<span class="keyword">int</span> storageId : complexFieldStorageIds) {</a></span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1337</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;1338</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;            <span class="comment">// Get old and new complex fields having this storage ID</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1339</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;            <span class="keyword">final</span> ComplexField&lt;?&gt; oldField = oldType.complexFields.get(storageId);</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1340</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;            <span class="keyword">final</span> ComplexField&lt;?&gt; newField = newType.complexFields.get(storageId);</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1341</td>  <td class="nbHitsUncovered"><a title="Line 1341: Conditional coverage 0% (0/4) [each condition: 0%, 0%].">&nbsp;0</a></td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;<a title="Line 1341: Conditional coverage 0% (0/4) [each condition: 0%, 0%].">            <span class="keyword">if</span> (oldField == <span class="keyword">null</span> || newField == <span class="keyword">null</span>)</a></span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1342</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;                <span class="keyword">continue</span>;</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1343</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;            <span class="keyword">final</span> List&lt;? <span class="keyword">extends</span> SimpleField&lt;?&gt;&gt; oldSubFields = oldField.getSubFields();</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1344</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;            <span class="keyword">final</span> List&lt;? <span class="keyword">extends</span> SimpleField&lt;?&gt;&gt; newSubFields = newField.getSubFields();</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1345</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;            <span class="keyword">final</span> <span class="keyword">int</span> numSubFields = oldSubFields.size();</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1346</td>  <td class="nbHitsUncovered"><a title="Line 1346: Conditional coverage 0% (0/4) [each condition: 0%, 0%].">&nbsp;0</a></td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;<a title="Line 1346: Conditional coverage 0% (0/4) [each condition: 0%, 0%].">            <span class="keyword">assert</span> numSubFields == newSubFields.size();</a></span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1347</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;1348</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;            <span class="comment">// Iterate over subfields</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1349</td>  <td class="nbHitsUncovered"><a title="Line 1349: Conditional coverage 0% (0/2).">&nbsp;0</a></td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;<a title="Line 1349: Conditional coverage 0% (0/2).">            <span class="keyword">for</span> (<span class="keyword">int</span> i = 0; i &lt; numSubFields; i++) {</a></span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1350</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;                <span class="keyword">final</span> SimpleField&lt;?&gt; oldSubField = oldSubFields.get(i);</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1351</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;                <span class="keyword">final</span> SimpleField&lt;?&gt; newSubField = newSubFields.get(i);</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1352</td>  <td class="nbHitsUncovered"><a title="Line 1352: Conditional coverage 0% (0/4) [each condition: 0%, 0%].">&nbsp;0</a></td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;<a title="Line 1352: Conditional coverage 0% (0/4) [each condition: 0%, 0%].">                <span class="keyword">assert</span> oldSubField.storageId == newSubField.storageId;</a></span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1353</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;                <span class="keyword">final</span> <span class="keyword">int</span> subStorageId = oldSubField.storageId;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1354</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;1355</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;                <span class="comment">// Get storage IDs that are no longer allowed, if any</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1356</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;                <span class="keyword">final</span> TreeSet&lt;Integer&gt; removedObjectTypes = <span class="keyword">this</span>.findRemovedObjectTypes(info, targetVersion, subStorageId);</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1357</td>  <td class="nbHitsUncovered"><a title="Line 1357: Conditional coverage 0% (0/2).">&nbsp;0</a></td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;<a title="Line 1357: Conditional coverage 0% (0/2).">                <span class="keyword">if</span> (removedObjectTypes == <span class="keyword">null</span>)</a></span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1358</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;                    <span class="keyword">continue</span>;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1359</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;1360</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;                <span class="comment">// Unreference sub-fields as needed</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1361</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;                oldField.unreferenceRemovedObjectTypes(<span class="keyword">this</span>, id, (ReferenceField)oldSubField, removedObjectTypes);</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1362</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;            }</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1363</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;        }</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1364</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;1365</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="comment">//////// Update object version and corresponding index entry</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1366</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;1367</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        <span class="comment">// Update object version</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1368</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;        ObjInfo.write(<span class="keyword">this</span>, id, newVersion, info.isDeleteNotified());</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1369</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;1370</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        <span class="comment">// Update object version index entry</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1371</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;        <span class="keyword">this</span>.kvt.remove(Database.buildVersionIndexKey(id, oldVersion));</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1372</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;        <span class="keyword">this</span>.kvt.put(Database.buildVersionIndexKey(id, newVersion), ByteUtil.EMPTY);</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1373</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;1374</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="comment">//////// Notify listeners</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1375</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;1376</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        <span class="comment">// Lock down old field values map</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1377</td>  <td class="nbHitsUncovered"><a title="Line 1377: Conditional coverage 0% (0/2).">&nbsp;0</a></td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;<a title="Line 1377: Conditional coverage 0% (0/2).">        <span class="keyword">final</span> NavigableMap&lt;Integer, Object&gt; readOnlyOldValuesMap = oldValueMap != <span class="keyword">null</span> ?</a></span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1378</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;          Maps.unmodifiableNavigableMap(oldValueMap) : <span class="keyword">null</span>;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;1379</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;1380</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        <span class="comment">// Notify about version update</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1381</td>  <td class="nbHitsUncovered"><a title="Line 1381: Conditional coverage 0% (0/2).">&nbsp;0</a></td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;<a title="Line 1381: Conditional coverage 0% (0/2).">        <span class="keyword">for</span> (VersionChangeListener listener : <span class="keyword">this</span>.versionChangeListeners)</a></span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1382</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;            listener.onVersionChange(<span class="keyword">this</span>, id, oldVersion, newVersion, readOnlyOldValuesMap);</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1383</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;    }</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1384</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;1385</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="comment">/**</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1386</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * Find storage ID's which are no longer allowed by a reference field when upgrading to the specified</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1387</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * schema version and therefore need to be scrubbed during the upgrade.</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1388</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     */</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1389</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="keyword">private</span> TreeSet&lt;Integer&gt; findRemovedObjectTypes(ObjInfo info, Schema newVersion, <span class="keyword">int</span> storageId) {</pre></td></tr>
<tr>  <td class="numLine">&nbsp;1390</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;1391</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        <span class="comment">// Get old schema version</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1392</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;        <span class="keyword">final</span> Schema oldVersion = info.getSchema();</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1393</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;1394</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        <span class="comment">// Get old and new object types</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1395</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;        <span class="keyword">final</span> ObjType oldType = info.getObjType();</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1396</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;        <span class="keyword">final</span> ObjType newType = newVersion.getObjType(info.getId().getStorageId());</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1397</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;1398</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        <span class="comment">// Get old and new reference fields having specified storage ID</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1399</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;        <span class="keyword">final</span> ReferenceField oldField = oldType.referenceFields.get(storageId);</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1400</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;        <span class="keyword">final</span> ReferenceField newField = newType.referenceFields.get(storageId);</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1401</td>  <td class="nbHitsUncovered"><a title="Line 1401: Conditional coverage 0% (0/4) [each condition: 0%, 0%].">&nbsp;0</a></td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;<a title="Line 1401: Conditional coverage 0% (0/4) [each condition: 0%, 0%].">        <span class="keyword">if</span> (oldField == <span class="keyword">null</span> || newField == <span class="keyword">null</span>)</a></span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1402</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;            <span class="keyword">return</span> <span class="keyword">null</span>;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1403</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;1404</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        <span class="comment">// Check allowed storage IDs</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1405</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;        <span class="keyword">final</span> SortedSet&lt;Integer&gt; newObjectTypes = newField.getObjectTypes();</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1406</td>  <td class="nbHitsUncovered"><a title="Line 1406: Conditional coverage 0% (0/2).">&nbsp;0</a></td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;<a title="Line 1406: Conditional coverage 0% (0/2).">        <span class="keyword">if</span> (newObjectTypes == <span class="keyword">null</span>)</a></span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1407</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;            <span class="keyword">return</span> <span class="keyword">null</span>;                                                <span class="comment">// new field can refer to any type in any schema version</span></span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1408</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;        SortedSet&lt;Integer&gt; oldObjectTypes = oldField.getObjectTypes();</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1409</td>  <td class="nbHitsUncovered"><a title="Line 1409: Conditional coverage 0% (0/2).">&nbsp;0</a></td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;<a title="Line 1409: Conditional coverage 0% (0/2).">        <span class="keyword">if</span> (oldObjectTypes == <span class="keyword">null</span>)</a></span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1410</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;            oldObjectTypes = <span class="keyword">this</span>.schemas.objTypeStorageIds;            <span class="comment">// old field can refer to any type in any schema version</span></span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1411</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;1412</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        <span class="comment">// Identify storage IDs which are were allowed by old field but are no longer allowed by new field</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1413</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;        <span class="keyword">final</span> TreeSet&lt;Integer&gt; removedObjectTypes = <span class="keyword">new</span> TreeSet&lt;&gt;(oldObjectTypes);</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1414</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;        removedObjectTypes.removeAll(newObjectTypes);</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1415</td>  <td class="nbHitsUncovered"><a title="Line 1415: Conditional coverage 0% (0/2).">&nbsp;0</a></td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;<a title="Line 1415: Conditional coverage 0% (0/2).">        <span class="keyword">return</span> !removedObjectTypes.isEmpty() ? removedObjectTypes : <span class="keyword">null</span>;</a></span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1416</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    }</pre></td></tr>
<tr>  <td class="numLine">&nbsp;1417</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;1418</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="comment">/**</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1419</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * Query objects by schema version.</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1420</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1421</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @return read-only, real-time view of all database objects indexed by schema version</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1422</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @throws StaleTransactionException if this transaction is no longer usable</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1423</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     */</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1424</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="keyword">public</span> <span class="keyword">synchronized</span> CoreIndex&lt;Integer, ObjId&gt; queryVersion() {</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1425</td>  <td class="nbHitsUncovered"><a title="Line 1425: Conditional coverage 0% (0/2).">&nbsp;0</a></td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;<a title="Line 1425: Conditional coverage 0% (0/2).">        <span class="keyword">if</span> (<span class="keyword">this</span>.stale)</a></span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1426</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;            <span class="keyword">throw</span> <span class="keyword">new</span> StaleTransactionException(<span class="keyword">this</span>);</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1427</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;        <span class="keyword">return</span> <span class="keyword">this</span>.db.getVersionIndex(<span class="keyword">this</span>);</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1428</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    }</pre></td></tr>
<tr>  <td class="numLine">&nbsp;1429</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;1430</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="comment">/**</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1431</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * Add an {@link VersionChangeListener} to this transaction.</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1432</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1433</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @param listener the listener to add</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1434</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @throws IllegalArgumentException if {@code listener} is null</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1435</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @throws StaleTransactionException if this transaction is no longer usable</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1436</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     */</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1437</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="keyword">public</span> <span class="keyword">synchronized</span> <span class="keyword">void</span> addVersionChangeListener(VersionChangeListener listener) {</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1438</td>  <td class="nbHitsUncovered"><a title="Line 1438: Conditional coverage 0% (0/2).">&nbsp;0</a></td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;<a title="Line 1438: Conditional coverage 0% (0/2).">        <span class="keyword">if</span> (<span class="keyword">this</span>.stale)</a></span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1439</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;            <span class="keyword">throw</span> <span class="keyword">new</span> StaleTransactionException(<span class="keyword">this</span>);</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1440</td>  <td class="nbHitsUncovered"><a title="Line 1440: Conditional coverage 0% (0/2).">&nbsp;0</a></td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;<a title="Line 1440: Conditional coverage 0% (0/2).">        <span class="keyword">if</span> (listener == <span class="keyword">null</span>)</a></span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1441</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;            <span class="keyword">throw</span> <span class="keyword">new</span> IllegalArgumentException(<span class="string">"null listener"</span>);</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1442</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;        <span class="keyword">this</span>.versionChangeListeners.add(listener);</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1443</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;    }</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1444</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;1445</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="comment">/**</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1446</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * Remove an {@link VersionChangeListener} from this transaction.</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1447</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1448</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @param listener the listener to remove</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1449</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @throws StaleTransactionException if this transaction is no longer usable</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1450</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @throws IllegalArgumentException if {@code listener} is null</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1451</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     */</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1452</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="keyword">public</span> <span class="keyword">synchronized</span> <span class="keyword">void</span> removeVersionChangeListener(VersionChangeListener listener) {</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1453</td>  <td class="nbHitsUncovered"><a title="Line 1453: Conditional coverage 0% (0/2).">&nbsp;0</a></td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;<a title="Line 1453: Conditional coverage 0% (0/2).">        <span class="keyword">if</span> (<span class="keyword">this</span>.stale)</a></span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1454</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;            <span class="keyword">throw</span> <span class="keyword">new</span> StaleTransactionException(<span class="keyword">this</span>);</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1455</td>  <td class="nbHitsUncovered"><a title="Line 1455: Conditional coverage 0% (0/2).">&nbsp;0</a></td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;<a title="Line 1455: Conditional coverage 0% (0/2).">        <span class="keyword">if</span> (listener == <span class="keyword">null</span>)</a></span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1456</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;            <span class="keyword">throw</span> <span class="keyword">new</span> IllegalArgumentException(<span class="string">"null listener"</span>);</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1457</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;        <span class="keyword">this</span>.versionChangeListeners.remove(listener);</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1458</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;    }</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1459</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;1460</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">// Object and Field Access</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1461</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;1462</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="comment">/**</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1463</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * Get all objects in the database.</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1464</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1465</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * &lt;p&gt;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1466</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * The returned set includes objects from all schema versions. Use {@link #queryVersion} to</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1467</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * find objects with a specific schema version.</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1468</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * &lt;/p&gt;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1469</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1470</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * &lt;p&gt;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1471</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * The returned set is mutable, with the exception that {@link NavigableSet#add add()} is not supported.</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1472</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * Deleting an element results in {@linkplain #delete deleting} the corresponding object.</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1473</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * &lt;/p&gt;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1474</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1475</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @return set containing all objects</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1476</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @throws StaleTransactionException if this transaction is no longer usable</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1477</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @see #getAll(int)</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1478</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     */</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1479</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="keyword">public</span> NavigableSet&lt;ObjId&gt; getAll() {</pre></td></tr>
<tr>  <td class="numLine">&nbsp;1480</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;1481</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        <span class="comment">// Sanity check</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1482</td>  <td class="nbHitsUncovered"><a title="Line 1482: Conditional coverage 0% (0/2).">&nbsp;0</a></td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;<a title="Line 1482: Conditional coverage 0% (0/2).">        <span class="keyword">if</span> (<span class="keyword">this</span>.stale)</a></span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1483</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;            <span class="keyword">throw</span> <span class="keyword">new</span> StaleTransactionException(<span class="keyword">this</span>);</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1484</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;1485</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        <span class="comment">// Return objects</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1486</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;        <span class="keyword">return</span> <span class="keyword">new</span> ObjTypeSet(<span class="keyword">this</span>);</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1487</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    }</pre></td></tr>
<tr>  <td class="numLine">&nbsp;1488</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;1489</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="comment">/**</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1490</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * Get all objects whose object type has the specified storage ID.</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1491</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1492</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * &lt;p&gt;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1493</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * The returned set is mutable, with the exception that {@link NavigableSet#add add()} is not supported.</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1494</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * Deleting an element results in {@linkplain #delete deleting} the corresponding object.</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1495</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * &lt;/p&gt;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1496</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1497</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @param storageId object type storage ID</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1498</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @return set containing all objects having the specified storage ID</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1499</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @throws UnknownTypeException if {@code storageId} does not correspond to any known object type</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1500</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @throws StaleTransactionException if this transaction is no longer usable</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1501</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @see #getAll()</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1502</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     */</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1503</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="keyword">public</span> NavigableSet&lt;ObjId&gt; getAll(<span class="keyword">int</span> storageId) {</pre></td></tr>
<tr>  <td class="numLine">&nbsp;1504</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;1505</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        <span class="comment">// Sanity check</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1506</td>  <td class="nbHitsUncovered"><a title="Line 1506: Conditional coverage 0% (0/2).">&nbsp;0</a></td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;<a title="Line 1506: Conditional coverage 0% (0/2).">        <span class="keyword">if</span> (<span class="keyword">this</span>.stale)</a></span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1507</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;            <span class="keyword">throw</span> <span class="keyword">new</span> StaleTransactionException(<span class="keyword">this</span>);</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1508</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;        <span class="keyword">this</span>.schemas.verifyStorageInfo(storageId, ObjTypeStorageInfo.<span class="keyword">class</span>);</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1509</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;1510</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        <span class="comment">// Return objects</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1511</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;        <span class="keyword">return</span> <span class="keyword">new</span> ObjTypeSet(<span class="keyword">this</span>, storageId);</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1512</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    }</pre></td></tr>
<tr>  <td class="numLine">&nbsp;1513</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;1514</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="comment">/**</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1515</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * Read the value of a {@link SimpleField} from an object, optionally updating the object's schema version.</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1516</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1517</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * &lt;p&gt;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1518</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * If {@code updateVersion} is true, the schema version of the object will be automatically changed to match</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1519</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * {@linkplain #getSchema() the schema version associated with this transaction}, if necessary, prior to</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1520</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * reading the field.</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1521</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * &lt;/p&gt;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1522</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1523</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @param id object ID of the object</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1524</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @param storageId storage ID of the {@link SimpleField}</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1525</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @param updateVersion true to first automatically update the object's schema version, false to not change it</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1526</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @return value of the field in the object</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1527</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @throws StaleTransactionException if this transaction is no longer usable</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1528</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @throws DeletedObjectException if no object with ID equal to {@code id} is found</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1529</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @throws UnknownTypeException if {@code id} specifies an unknown object type</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1530</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @throws UnknownFieldException if no {@link SimpleField} corresponding to {@code storageId} exists in the object</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1531</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @throws IllegalArgumentException if {@code id} is null</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1532</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @throws TypeNotInSchemaVersionException {@code updateVersion} is true and the object could not be updated because</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1533</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *   the object's type does not exist in the schema version associated with this transaction</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1534</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     */</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1535</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="keyword">public</span> <span class="keyword">synchronized</span> Object readSimpleField(ObjId id, <span class="keyword">int</span> storageId, <span class="keyword">boolean</span> updateVersion) {</pre></td></tr>
<tr>  <td class="numLine">&nbsp;1536</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;1537</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        <span class="comment">// Sanity check</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1538</td>  <td class="nbHitsUncovered"><a title="Line 1538: Conditional coverage 0% (0/2).">&nbsp;0</a></td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;<a title="Line 1538: Conditional coverage 0% (0/2).">        <span class="keyword">if</span> (<span class="keyword">this</span>.stale)</a></span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1539</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;            <span class="keyword">throw</span> <span class="keyword">new</span> StaleTransactionException(<span class="keyword">this</span>);</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1540</td>  <td class="nbHitsUncovered"><a title="Line 1540: Conditional coverage 0% (0/2).">&nbsp;0</a></td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;<a title="Line 1540: Conditional coverage 0% (0/2).">        <span class="keyword">if</span> (id == <span class="keyword">null</span>)</a></span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1541</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;            <span class="keyword">throw</span> <span class="keyword">new</span> IllegalArgumentException(<span class="string">"null id"</span>);</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1542</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;1543</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        <span class="comment">// Get object info</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1544</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;        <span class="keyword">final</span> ObjInfo info = <span class="keyword">this</span>.getObjectInfo(id, updateVersion);</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1545</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;1546</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        <span class="comment">// Find field</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1547</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;        <span class="keyword">final</span> SimpleField&lt;?&gt; field = info.getObjType().simpleFields.get(storageId);</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1548</td>  <td class="nbHitsUncovered"><a title="Line 1548: Conditional coverage 0% (0/2).">&nbsp;0</a></td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;<a title="Line 1548: Conditional coverage 0% (0/2).">        <span class="keyword">if</span> (field == <span class="keyword">null</span>)</a></span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1549</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;            <span class="keyword">throw</span> <span class="keyword">new</span> UnknownFieldException(info.getObjType(), storageId, <span class="string">"simple field"</span>);</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1550</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;1551</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        <span class="comment">// Read field</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1552</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;        <span class="keyword">final</span> <span class="keyword">byte</span>[] key = field.buildKey(id);</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1553</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;        <span class="keyword">final</span> <span class="keyword">byte</span>[] value = <span class="keyword">this</span>.kvt.get(key);</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1554</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;1555</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        <span class="comment">// Decode value</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1556</td>  <td class="nbHitsUncovered"><a title="Line 1556: Conditional coverage 0% (0/2).">&nbsp;0</a></td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;<a title="Line 1556: Conditional coverage 0% (0/2).">        <span class="keyword">return</span> field.fieldType.read(<span class="keyword">new</span> ByteReader(value != <span class="keyword">null</span> ? value : field.fieldType.getDefaultValue()));</a></span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1557</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    }</pre></td></tr>
<tr>  <td class="numLine">&nbsp;1558</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;1559</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="comment">/**</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1560</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * Change the value of a {@link SimpleField} in an object, optionally updating the object's schema version.</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1561</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1562</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * &lt;p&gt;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1563</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * If {@code updateVersion} is true, the schema version of the object will be automatically changed to match</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1564</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * {@linkplain #getSchema() the schema version associated with this transaction}, if necessary, prior to</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1565</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * writing the field.</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1566</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * &lt;/p&gt;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1567</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1568</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @param id object ID of the object</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1569</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @param storageId storage ID of the {@link SimpleField}</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1570</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @param value new value for the field</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1571</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @param updateVersion true to first automatically update the object's schema version, false to not change it</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1572</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @throws StaleTransactionException if this transaction is no longer usable</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1573</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @throws DeletedObjectException if no object with ID equal to {@code id} is found</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1574</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @throws UnknownTypeException if {@code id} specifies an unknown object type</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1575</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @throws UnknownFieldException if no {@link SimpleField} corresponding to {@code storageId} exists in the object</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1576</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @throws TypeNotInSchemaVersionException {@code updateVersion} is true and the object could not be updated because</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1577</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *   the object's type does not exist in the schema version associated with this transaction</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1578</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @throws IllegalArgumentException if {@code value} is not an appropriate value for the field</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1579</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @throws IllegalArgumentException if {@code id} is null</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1580</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     */</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1581</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="keyword">public</span> <span class="keyword">synchronized</span> <span class="keyword">void</span> writeSimpleField(<span class="keyword">final</span> ObjId id,</pre></td></tr>
<tr>  <td class="numLine">&nbsp;1582</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;      <span class="keyword">final</span> <span class="keyword">int</span> storageId, <span class="keyword">final</span> Object value, <span class="keyword">final</span> <span class="keyword">boolean</span> updateVersion) {</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1583</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;        <span class="keyword">this</span>.mutateAndNotify(id, <span class="keyword">new</span> Mutation&lt;Void&gt;() {</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1584</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;            @Override</pre></td></tr>
<tr>  <td class="numLine">&nbsp;1585</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;            <span class="keyword">public</span> Void mutate() {</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1586</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;                Transaction.<span class="keyword">this</span>.doWriteSimpleField(id, storageId, value, updateVersion);</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1587</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;                <span class="keyword">return</span> <span class="keyword">null</span>;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1588</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;            }</pre></td></tr>
<tr>  <td class="numLine">&nbsp;1589</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        });</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1590</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;    }</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1591</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;1592</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="keyword">private</span> <span class="keyword">synchronized</span> <span class="keyword">void</span> doWriteSimpleField(ObjId id, <span class="keyword">int</span> storageId, <span class="keyword">final</span> Object newObj, <span class="keyword">boolean</span> updateVersion) {</pre></td></tr>
<tr>  <td class="numLine">&nbsp;1593</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;1594</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        <span class="comment">// Get object info</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1595</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;        <span class="keyword">final</span> ObjInfo info = <span class="keyword">this</span>.getObjectInfo(id, updateVersion);</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1596</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;1597</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        <span class="comment">// Find field</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1598</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;        <span class="keyword">final</span> SimpleField&lt;?&gt; field = info.getObjType().simpleFields.get(storageId);</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1599</td>  <td class="nbHitsUncovered"><a title="Line 1599: Conditional coverage 0% (0/2).">&nbsp;0</a></td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;<a title="Line 1599: Conditional coverage 0% (0/2).">        <span class="keyword">if</span> (field == <span class="keyword">null</span>)</a></span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1600</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;            <span class="keyword">throw</span> <span class="keyword">new</span> UnknownFieldException(info.getObjType(), storageId, <span class="string">"simple field"</span>);</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1601</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;1602</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        <span class="comment">// Get new value</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1603</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;        <span class="keyword">final</span> <span class="keyword">byte</span>[] key = field.buildKey(id);</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1604</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;        <span class="keyword">final</span> <span class="keyword">byte</span>[] newValue = field.encode(newObj);</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1605</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;1606</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        <span class="comment">// Before setting the new value, read the old value if one of the following is true:</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1607</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        <span class="comment">//  - The field is being monitored -&gt; we need to filter out "changes" that don't actuallly change anything</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1608</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        <span class="comment">//  - The field is indexed -&gt; we need the old value so we can remove the old index entry</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1609</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        <span class="comment">// If neither of the above is true, then there's no need to read the old value.</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1610</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;        <span class="keyword">byte</span>[] oldValue = <span class="keyword">null</span>;</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1611</td>  <td class="nbHitsUncovered"><a title="Line 1611: Conditional coverage 0% (0/6) [each condition: 0%, 0%, 0%].">&nbsp;0</a></td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;<a title="Line 1611: Conditional coverage 0% (0/6) [each condition: 0%, 0%, 0%].">        <span class="keyword">if</span> (field.indexed || field.compositeIndexMap != <span class="keyword">null</span> || <span class="keyword">this</span>.hasFieldMonitor(id, field)) {</a></span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1612</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;1613</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;            <span class="comment">// Get old value</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1614</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;            oldValue = <span class="keyword">this</span>.kvt.get(key);</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1615</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;1616</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;            <span class="comment">// Compare new to old value</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1617</td>  <td class="nbHitsUncovered"><a title="Line 1617: Conditional coverage 0% (0/8) [each condition: 0%, 0%, 0%, 0%].">&nbsp;0</a></td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;<a title="Line 1617: Conditional coverage 0% (0/8) [each condition: 0%, 0%, 0%, 0%].">            <span class="keyword">if</span> (oldValue != <span class="keyword">null</span> ? newValue != <span class="keyword">null</span> &amp;&amp; Arrays.equals(oldValue, newValue) : newValue == <span class="keyword">null</span>)</a></span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1618</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;                <span class="keyword">return</span>;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1619</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        }</pre></td></tr>
<tr>  <td class="numLine">&nbsp;1620</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;1621</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        <span class="comment">// Update value</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1622</td>  <td class="nbHitsUncovered"><a title="Line 1622: Conditional coverage 0% (0/2).">&nbsp;0</a></td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;<a title="Line 1622: Conditional coverage 0% (0/2).">        <span class="keyword">if</span> (newValue != <span class="keyword">null</span>)</a></span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1623</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;            <span class="keyword">this</span>.kvt.put(key, newValue);</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1624</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        <span class="keyword">else</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1625</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;            <span class="keyword">this</span>.kvt.remove(key);</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1626</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;1627</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        <span class="comment">// Update simple index, if any</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1628</td>  <td class="nbHitsUncovered"><a title="Line 1628: Conditional coverage 0% (0/2).">&nbsp;0</a></td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;<a title="Line 1628: Conditional coverage 0% (0/2).">        <span class="keyword">if</span> (field.indexed) {</a></span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1629</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;            <span class="keyword">this</span>.kvt.remove(Transaction.buildSimpleIndexEntry(field, id, oldValue));</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1630</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;            <span class="keyword">this</span>.kvt.put(Transaction.buildSimpleIndexEntry(field, id, newValue), ByteUtil.EMPTY);</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1631</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        }</pre></td></tr>
<tr>  <td class="numLine">&nbsp;1632</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;1633</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        <span class="comment">// Update affected composite indexes, if any</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1634</td>  <td class="nbHitsUncovered"><a title="Line 1634: Conditional coverage 0% (0/2).">&nbsp;0</a></td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;<a title="Line 1634: Conditional coverage 0% (0/2).">        <span class="keyword">if</span> (field.compositeIndexMap != <span class="keyword">null</span>) {</a></span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1635</td>  <td class="nbHitsUncovered"><a title="Line 1635: Conditional coverage 0% (0/2).">&nbsp;0</a></td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;<a title="Line 1635: Conditional coverage 0% (0/2).">            <span class="keyword">for</span> (Map.Entry&lt;CompositeIndex, Integer&gt; entry : field.compositeIndexMap.entrySet()) {</a></span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1636</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;                <span class="keyword">final</span> CompositeIndex index = entry.getKey();</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1637</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;                <span class="keyword">final</span> <span class="keyword">int</span> fieldIndexOffset = entry.getValue();</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1638</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;1639</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;                <span class="comment">// Build old composite index entry</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1640</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;                <span class="keyword">final</span> ByteWriter oldWriter = <span class="keyword">new</span> ByteWriter();</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1641</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;                UnsignedIntEncoder.write(oldWriter, index.storageId);</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1642</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;                <span class="keyword">int</span> fieldStart = -1;</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1643</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;                <span class="keyword">int</span> fieldEnd = -1;</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1644</td>  <td class="nbHitsUncovered"><a title="Line 1644: Conditional coverage 0% (0/2).">&nbsp;0</a></td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;<a title="Line 1644: Conditional coverage 0% (0/2).">                <span class="keyword">for</span> (SimpleField&lt;?&gt; otherField : index.fields) {</a></span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1645</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;                    <span class="keyword">final</span> <span class="keyword">byte</span>[] otherValue;</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1646</td>  <td class="nbHitsUncovered"><a title="Line 1646: Conditional coverage 0% (0/2).">&nbsp;0</a></td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;<a title="Line 1646: Conditional coverage 0% (0/2).">                    <span class="keyword">if</span> (otherField == field) {</a></span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1647</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;                        fieldStart = oldWriter.getLength();</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1648</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;                        otherValue = oldValue;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1649</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;                    } <span class="keyword">else</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1650</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;                        otherValue = <span class="keyword">this</span>.kvt.get(otherField.buildKey(id));         <span class="comment">// can be null (if field has default value)</span></span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1651</td>  <td class="nbHitsUncovered"><a title="Line 1651: Conditional coverage 0% (0/2).">&nbsp;0</a></td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;<a title="Line 1651: Conditional coverage 0% (0/2).">                    oldWriter.write(otherValue != <span class="keyword">null</span> ? otherValue : otherField.fieldType.getDefaultValue());</a></span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1652</td>  <td class="nbHitsUncovered"><a title="Line 1652: Conditional coverage 0% (0/2).">&nbsp;0</a></td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;<a title="Line 1652: Conditional coverage 0% (0/2).">                    <span class="keyword">if</span> (otherField == field)</a></span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1653</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;                        fieldEnd = oldWriter.getLength();</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1654</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;                }</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1655</td>  <td class="nbHitsUncovered"><a title="Line 1655: Conditional coverage 0% (0/4) [each condition: 0%, 0%].">&nbsp;0</a></td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;<a title="Line 1655: Conditional coverage 0% (0/4) [each condition: 0%, 0%].">                <span class="keyword">assert</span> fieldStart != -1;</a></span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1656</td>  <td class="nbHitsUncovered"><a title="Line 1656: Conditional coverage 0% (0/4) [each condition: 0%, 0%].">&nbsp;0</a></td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;<a title="Line 1656: Conditional coverage 0% (0/4) [each condition: 0%, 0%].">                <span class="keyword">assert</span> fieldEnd != -1;</a></span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1657</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;                id.writeTo(oldWriter);</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1658</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;1659</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;                <span class="comment">// Remove old composite index entry</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1660</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;                <span class="keyword">final</span> <span class="keyword">byte</span>[] oldIndexEntry = oldWriter.getBytes();</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1661</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;                <span class="keyword">this</span>.kvt.remove(oldIndexEntry);</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1662</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;1663</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;                <span class="comment">// Patch in new field value to create new composite index entry</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1664</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;                <span class="keyword">final</span> ByteWriter newWriter = <span class="keyword">new</span> ByteWriter(oldIndexEntry.length);</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1665</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;                newWriter.write(oldIndexEntry, 0, fieldStart);</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1666</td>  <td class="nbHitsUncovered"><a title="Line 1666: Conditional coverage 0% (0/2).">&nbsp;0</a></td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;<a title="Line 1666: Conditional coverage 0% (0/2).">                newWriter.write(newValue != <span class="keyword">null</span> ? newValue : field.fieldType.getDefaultValue());</a></span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1667</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;                newWriter.write(oldIndexEntry, fieldEnd, oldIndexEntry.length - fieldEnd);</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1668</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;1669</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;                <span class="comment">// Add new composite index entry</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1670</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;                <span class="keyword">this</span>.kvt.put(newWriter.getBytes(), ByteUtil.EMPTY);</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1671</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;            }</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1672</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        }</pre></td></tr>
<tr>  <td class="numLine">&nbsp;1673</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;1674</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        <span class="comment">// Notify monitors</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1675</td>  <td class="nbHitsUncovered"><a title="Line 1675: Conditional coverage 0% (0/2).">&nbsp;0</a></td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;<a title="Line 1675: Conditional coverage 0% (0/2).">        <span class="keyword">final</span> Object oldObj = field.fieldType.read(<span class="keyword">new</span> ByteReader(oldValue != <span class="keyword">null</span> ? oldValue : field.fieldType.getDefaultValue()));</a></span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1676</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;        <span class="keyword">this</span>.addFieldChangeNotification(<span class="keyword">new</span> SimpleFieldChangeNotifier(field, id) {</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1677</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;            @Override</pre></td></tr>
<tr>  <td class="numLine">&nbsp;1678</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;            @SuppressWarnings(<span class="string">"unchecked"</span>)</pre></td></tr>
<tr>  <td class="numLine">&nbsp;1679</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;            <span class="keyword">public</span> <span class="keyword">void</span> notify(Transaction tx, SimpleFieldChangeListener listener, <span class="keyword">int</span>[] path, NavigableSet&lt;ObjId&gt; referrers) {</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1680</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;                listener.onSimpleFieldChange(tx, <span class="keyword">this</span>.id, (SimpleField&lt;Object&gt;)field, path, referrers, oldObj, newObj);</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1681</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;            }</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1682</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        });</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1683</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;    }</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1684</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;1685</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="comment">/**</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1686</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * Bulid a simple index entry for the given field, object ID, and field value.</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1687</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1688</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @param field simple field</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1689</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @param id ID of object containing the field</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1690</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @param value encoded field value, or null for default value</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1691</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @return index key</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1692</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     */</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1693</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="keyword">private</span> <span class="keyword">static</span> <span class="keyword">byte</span>[] buildSimpleIndexEntry(SimpleField&lt;?&gt; field, ObjId id, <span class="keyword">byte</span>[] value) {</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1694</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;        <span class="keyword">final</span> ByteWriter writer = <span class="keyword">new</span> ByteWriter();</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1695</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;        UnsignedIntEncoder.write(writer, field.storageId);</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1696</td>  <td class="nbHitsUncovered"><a title="Line 1696: Conditional coverage 0% (0/2).">&nbsp;0</a></td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;<a title="Line 1696: Conditional coverage 0% (0/2).">        writer.write(value != <span class="keyword">null</span> ? value : field.fieldType.getDefaultValue());</a></span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1697</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;        id.writeTo(writer);</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1698</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;        <span class="keyword">return</span> writer.getBytes();</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1699</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    }</pre></td></tr>
<tr>  <td class="numLine">&nbsp;1700</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;1701</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="comment">/**</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1702</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * Read the value of a {@link CounterField} from an object, optionally updating the object's schema version.</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1703</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1704</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * &lt;p&gt;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1705</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * If {@code updateVersion} is true, the schema version of the object will be automatically changed to match</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1706</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * {@linkplain #getSchema() the schema version associated with this transaction}, if necessary, prior to</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1707</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * reading the field.</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1708</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * &lt;/p&gt;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1709</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1710</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @param id object ID of the object</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1711</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @param storageId storage ID of the {@link CounterField}</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1712</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @param updateVersion true to first automatically update the object's schema version, false to not change it</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1713</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @return value of the counter in the object</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1714</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @throws StaleTransactionException if this transaction is no longer usable</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1715</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @throws DeletedObjectException if no object with ID equal to {@code id} is found</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1716</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @throws UnknownTypeException if {@code id} specifies an unknown object type</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1717</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @throws UnknownFieldException if no {@link CounterField} corresponding to {@code storageId} exists in the object</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1718</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @throws TypeNotInSchemaVersionException {@code updateVersion} is true and the object could not be updated because</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1719</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *   the object's type does not exist in the schema version associated with this transaction</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1720</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @throws IllegalArgumentException if {@code id} is null</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1721</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     */</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1722</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="keyword">public</span> <span class="keyword">synchronized</span> <span class="keyword">long</span> readCounterField(ObjId id, <span class="keyword">int</span> storageId, <span class="keyword">boolean</span> updateVersion) {</pre></td></tr>
<tr>  <td class="numLine">&nbsp;1723</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;1724</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        <span class="comment">// Sanity check</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1725</td>  <td class="nbHitsUncovered"><a title="Line 1725: Conditional coverage 0% (0/2).">&nbsp;0</a></td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;<a title="Line 1725: Conditional coverage 0% (0/2).">        <span class="keyword">if</span> (<span class="keyword">this</span>.stale)</a></span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1726</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;            <span class="keyword">throw</span> <span class="keyword">new</span> StaleTransactionException(<span class="keyword">this</span>);</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1727</td>  <td class="nbHitsUncovered"><a title="Line 1727: Conditional coverage 0% (0/2).">&nbsp;0</a></td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;<a title="Line 1727: Conditional coverage 0% (0/2).">        <span class="keyword">if</span> (id == <span class="keyword">null</span>)</a></span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1728</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;            <span class="keyword">throw</span> <span class="keyword">new</span> IllegalArgumentException(<span class="string">"null id"</span>);</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1729</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;1730</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        <span class="comment">// Get object info</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1731</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;        <span class="keyword">final</span> ObjInfo info = <span class="keyword">this</span>.getObjectInfo(id, updateVersion);</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1732</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;1733</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        <span class="comment">// Find field</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1734</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;        <span class="keyword">final</span> CounterField field = info.getObjType().counterFields.get(storageId);</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1735</td>  <td class="nbHitsUncovered"><a title="Line 1735: Conditional coverage 0% (0/2).">&nbsp;0</a></td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;<a title="Line 1735: Conditional coverage 0% (0/2).">        <span class="keyword">if</span> (field == <span class="keyword">null</span>)</a></span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1736</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;            <span class="keyword">throw</span> <span class="keyword">new</span> UnknownFieldException(info.getObjType(), storageId, <span class="string">"counter field"</span>);</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1737</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;1738</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        <span class="comment">// Read field</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1739</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;        <span class="keyword">final</span> <span class="keyword">byte</span>[] key = field.buildKey(id);</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1740</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;        <span class="keyword">final</span> <span class="keyword">byte</span>[] value = <span class="keyword">this</span>.kvt.get(key);</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1741</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;1742</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        <span class="comment">// Decode value</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1743</td>  <td class="nbHitsUncovered"><a title="Line 1743: Conditional coverage 0% (0/2).">&nbsp;0</a></td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;<a title="Line 1743: Conditional coverage 0% (0/2).">        <span class="keyword">return</span> value != <span class="keyword">null</span> ? <span class="keyword">this</span>.kvt.decodeCounter(value) : 0;</a></span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1744</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    }</pre></td></tr>
<tr>  <td class="numLine">&nbsp;1745</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;1746</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="comment">/**</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1747</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * Set the value of a {@link CounterField} in an object, optionally updating the object's schema version.</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1748</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1749</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * &lt;p&gt;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1750</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * If {@code updateVersion} is true, the schema version of the object will be automatically changed to match</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1751</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * {@linkplain #getSchema() the schema version associated with this transaction}, if necessary, prior to</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1752</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * writing the field.</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1753</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * &lt;/p&gt;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1754</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1755</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @param id object ID of the object</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1756</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @param storageId storage ID of the {@link CounterField}</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1757</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @param value new counter value</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1758</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @param updateVersion true to first automatically update the object's schema version, false to not change it</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1759</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @throws StaleTransactionException if this transaction is no longer usable</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1760</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @throws DeletedObjectException if no object with ID equal to {@code id} is found</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1761</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @throws UnknownTypeException if {@code id} specifies an unknown object type</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1762</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @throws UnknownFieldException if no {@link CounterField} corresponding to {@code storageId} exists in the object</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1763</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @throws TypeNotInSchemaVersionException {@code updateVersion} is true and the object could not be updated because</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1764</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *   the object's type does not exist in the schema version associated with this transaction</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1765</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @throws IllegalArgumentException if {@code id} is null</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1766</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     */</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1767</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="keyword">public</span> <span class="keyword">synchronized</span> <span class="keyword">void</span> writeCounterField(<span class="keyword">final</span> ObjId id, <span class="keyword">final</span> <span class="keyword">int</span> storageId, <span class="keyword">final</span> <span class="keyword">long</span> value, <span class="keyword">final</span> <span class="keyword">boolean</span> updateVersion) {</pre></td></tr>
<tr>  <td class="numLine">&nbsp;1768</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;1769</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        <span class="comment">// Sanity check</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1770</td>  <td class="nbHitsUncovered"><a title="Line 1770: Conditional coverage 0% (0/2).">&nbsp;0</a></td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;<a title="Line 1770: Conditional coverage 0% (0/2).">        <span class="keyword">if</span> (<span class="keyword">this</span>.stale)</a></span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1771</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;            <span class="keyword">throw</span> <span class="keyword">new</span> StaleTransactionException(<span class="keyword">this</span>);</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1772</td>  <td class="nbHitsUncovered"><a title="Line 1772: Conditional coverage 0% (0/2).">&nbsp;0</a></td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;<a title="Line 1772: Conditional coverage 0% (0/2).">        <span class="keyword">if</span> (id == <span class="keyword">null</span>)</a></span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1773</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;            <span class="keyword">throw</span> <span class="keyword">new</span> IllegalArgumentException(<span class="string">"null id"</span>);</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1774</td>  <td class="nbHitsUncovered"><a title="Line 1774: Conditional coverage 0% (0/2).">&nbsp;0</a></td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;<a title="Line 1774: Conditional coverage 0% (0/2).">        <span class="keyword">if</span> (<span class="keyword">this</span>.readOnly)</a></span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1775</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;            <span class="keyword">throw</span> <span class="keyword">new</span> ReadOnlyTransactionException(<span class="keyword">this</span>);</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1776</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;1777</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        <span class="comment">// Get object info</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1778</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;        <span class="keyword">final</span> ObjInfo info = <span class="keyword">this</span>.getObjectInfo(id, updateVersion);</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1779</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;1780</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        <span class="comment">// Find field</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1781</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;        <span class="keyword">final</span> CounterField field = info.getObjType().counterFields.get(storageId);</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1782</td>  <td class="nbHitsUncovered"><a title="Line 1782: Conditional coverage 0% (0/2).">&nbsp;0</a></td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;<a title="Line 1782: Conditional coverage 0% (0/2).">        <span class="keyword">if</span> (field == <span class="keyword">null</span>)</a></span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1783</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;            <span class="keyword">throw</span> <span class="keyword">new</span> UnknownFieldException(info.getObjType(), storageId, <span class="string">"counter field"</span>);</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1784</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;1785</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        <span class="comment">// Set value</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1786</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;        <span class="keyword">final</span> <span class="keyword">byte</span>[] key = field.buildKey(id);</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1787</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;        <span class="keyword">this</span>.kvt.put(key, <span class="keyword">this</span>.kvt.encodeCounter(value));</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1788</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;    }</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1789</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;1790</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="comment">/**</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1791</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * Adjust the value of a {@link CounterField} in an object by some amount, optionally updating the object's schema version.</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1792</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1793</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * &lt;p&gt;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1794</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * If {@code updateVersion} is true, the schema version of the object will be automatically changed to match</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1795</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * {@linkplain #getSchema() the schema version associated with this transaction}, if necessary, prior to</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1796</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * writing the field.</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1797</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * &lt;/p&gt;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1798</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1799</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @param id object ID of the object</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1800</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @param storageId storage ID of the {@link CounterField}</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1801</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @param offset offset value to add to counter value</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1802</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @param updateVersion true to first automatically update the object's schema version, false to not change it</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1803</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @throws StaleTransactionException if this transaction is no longer usable</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1804</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @throws DeletedObjectException if no object with ID equal to {@code id} is found</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1805</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @throws UnknownTypeException if {@code id} specifies an unknown object type</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1806</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @throws UnknownFieldException if no {@link CounterField} corresponding to {@code storageId} exists in the object</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1807</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @throws TypeNotInSchemaVersionException {@code updateVersion} is true and the object could not be updated because</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1808</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *   the object's type does not exist in the schema version associated with this transaction</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1809</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @throws IllegalArgumentException if {@code id} is null</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1810</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     */</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1811</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="keyword">public</span> <span class="keyword">synchronized</span> <span class="keyword">void</span> adjustCounterField(ObjId id, <span class="keyword">int</span> storageId, <span class="keyword">long</span> offset, <span class="keyword">boolean</span> updateVersion) {</pre></td></tr>
<tr>  <td class="numLine">&nbsp;1812</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;1813</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        <span class="comment">// Sanity check</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1814</td>  <td class="nbHitsUncovered"><a title="Line 1814: Conditional coverage 0% (0/2).">&nbsp;0</a></td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;<a title="Line 1814: Conditional coverage 0% (0/2).">        <span class="keyword">if</span> (id == <span class="keyword">null</span>)</a></span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1815</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;            <span class="keyword">throw</span> <span class="keyword">new</span> IllegalArgumentException(<span class="string">"null id"</span>);</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1816</td>  <td class="nbHitsUncovered"><a title="Line 1816: Conditional coverage 0% (0/2).">&nbsp;0</a></td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;<a title="Line 1816: Conditional coverage 0% (0/2).">        <span class="keyword">if</span> (<span class="keyword">this</span>.stale)</a></span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1817</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;            <span class="keyword">throw</span> <span class="keyword">new</span> StaleTransactionException(<span class="keyword">this</span>);</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1818</td>  <td class="nbHitsUncovered"><a title="Line 1818: Conditional coverage 0% (0/2).">&nbsp;0</a></td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;<a title="Line 1818: Conditional coverage 0% (0/2).">        <span class="keyword">if</span> (<span class="keyword">this</span>.readOnly)</a></span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1819</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;            <span class="keyword">throw</span> <span class="keyword">new</span> ReadOnlyTransactionException(<span class="keyword">this</span>);</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1820</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;1821</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        <span class="comment">// Optimize away non-change</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1822</td>  <td class="nbHitsUncovered"><a title="Line 1822: Conditional coverage 0% (0/2).">&nbsp;0</a></td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;<a title="Line 1822: Conditional coverage 0% (0/2).">        <span class="keyword">if</span> (offset == 0)</a></span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1823</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;            <span class="keyword">return</span>;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1824</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;1825</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        <span class="comment">// Get object info</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1826</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;        <span class="keyword">final</span> ObjInfo info = <span class="keyword">this</span>.getObjectInfo(id, updateVersion);</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1827</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;1828</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        <span class="comment">// Find field</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1829</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;        <span class="keyword">final</span> CounterField field = info.getObjType().counterFields.get(storageId);</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1830</td>  <td class="nbHitsUncovered"><a title="Line 1830: Conditional coverage 0% (0/2).">&nbsp;0</a></td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;<a title="Line 1830: Conditional coverage 0% (0/2).">        <span class="keyword">if</span> (field == <span class="keyword">null</span>)</a></span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1831</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;            <span class="keyword">throw</span> <span class="keyword">new</span> UnknownFieldException(info.getObjType(), storageId, <span class="string">"counter field"</span>);</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1832</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;1833</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        <span class="comment">// Adjust counter value</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1834</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;        <span class="keyword">this</span>.kvt.adjustCounter(field.buildKey(id), offset);</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1835</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;    }</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1836</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;1837</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="comment">/**</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1838</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * Access a {@link SetField} associated with an object, optionally updating the object's schema version.</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1839</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1840</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * &lt;p&gt;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1841</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * If {@code updateVersion} is true, the schema version of the object will be automatically changed to match</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1842</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * {@linkplain #getSchema() the schema version associated with this transaction}, if necessary.</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1843</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * &lt;/p&gt;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1844</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1845</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @param id object ID of the object</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1846</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @param storageId storage ID of the {@link SetField}</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1847</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @param updateVersion true to first automatically update the object's schema version, false to not change it</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1848</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @return set field value</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1849</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @throws StaleTransactionException if this transaction is no longer usable</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1850</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @throws DeletedObjectException if no object with ID equal to {@code id} is found</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1851</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @throws UnknownTypeException if {@code id} specifies an unknown object type</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1852</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @throws UnknownFieldException if no {@link SetField} corresponding to {@code storageId} exists in the object</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1853</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @throws TypeNotInSchemaVersionException {@code updateVersion} is true and the object could not be updated because</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1854</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *   the object's type does not exist in the schema version associated with this transaction</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1855</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @throws IllegalArgumentException if {@code id} is null</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1856</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     */</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1857</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="keyword">public</span> NavigableSet&lt;?&gt; readSetField(ObjId id, <span class="keyword">int</span> storageId, <span class="keyword">boolean</span> updateVersion) {</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1858</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;        <span class="keyword">return</span> <span class="keyword">this</span>.readComplexField(id, storageId, updateVersion, SetField.<span class="keyword">class</span>, NavigableSet.<span class="keyword">class</span>);</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1859</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    }</pre></td></tr>
<tr>  <td class="numLine">&nbsp;1860</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;1861</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="comment">/**</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1862</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * Access a {@link ListField} associated with an object, optionally updating the object's schema version.</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1863</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1864</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * &lt;p&gt;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1865</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * If {@code updateVersion} is true, the schema version of the object will be automatically changed to match</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1866</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * {@linkplain #getSchema() the schema version associated with this transaction}, if necessary.</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1867</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * &lt;/p&gt;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1868</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1869</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @param id object ID of the object</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1870</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @param storageId storage ID of the {@link ListField}</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1871</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @param updateVersion true to first automatically update the object's schema version, false to not change it</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1872</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @return list field value</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1873</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @throws StaleTransactionException if this transaction is no longer usable</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1874</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @throws DeletedObjectException if no object with ID equal to {@code id} is found</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1875</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @throws UnknownTypeException if {@code id} specifies an unknown object type</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1876</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @throws UnknownFieldException if no {@link ListField} corresponding to {@code storageId} exists in the object</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1877</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @throws TypeNotInSchemaVersionException {@code updateVersion} is true and the object could not be updated because</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1878</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *   the object's type does not exist in the schema version associated with this transaction</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1879</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @throws IllegalArgumentException if {@code id} is null</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1880</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     */</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1881</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="keyword">public</span> List&lt;?&gt; readListField(ObjId id, <span class="keyword">int</span> storageId, <span class="keyword">boolean</span> updateVersion) {</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1882</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;        <span class="keyword">return</span> <span class="keyword">this</span>.readComplexField(id, storageId, updateVersion, ListField.<span class="keyword">class</span>, List.<span class="keyword">class</span>);</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1883</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    }</pre></td></tr>
<tr>  <td class="numLine">&nbsp;1884</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;1885</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="comment">/**</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1886</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * Access a {@link MapField} associated with an object, optionally updating the object's schema version.</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1887</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1888</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * &lt;p&gt;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1889</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * If {@code updateVersion} is true, the schema version of the object will be automatically changed to match</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1890</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * {@linkplain #getSchema() the schema version associated with this transaction}, if necessary.</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1891</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * &lt;/p&gt;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1892</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1893</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @param id object ID of the object</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1894</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @param storageId storage ID of the {@link MapField}</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1895</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @param updateVersion true to first automatically update the object's schema version, false to not change it</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1896</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @return map field value</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1897</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @throws StaleTransactionException if this transaction is no longer usable</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1898</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @throws DeletedObjectException if no object with ID equal to {@code id} is found</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1899</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @throws UnknownTypeException if {@code id} specifies an unknown object type</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1900</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @throws UnknownFieldException if no {@link MapField} corresponding to {@code storageId} exists in the object</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1901</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @throws TypeNotInSchemaVersionException {@code updateVersion} is true and the object could not be updated because</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1902</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *   the object's type does not exist in the schema version associated with this transaction</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1903</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @throws IllegalArgumentException if {@code id} is null</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1904</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     */</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1905</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="keyword">public</span> NavigableMap&lt;?, ?&gt; readMapField(ObjId id, <span class="keyword">int</span> storageId, <span class="keyword">boolean</span> updateVersion) {</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1906</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;        <span class="keyword">return</span> <span class="keyword">this</span>.readComplexField(id, storageId, updateVersion, MapField.<span class="keyword">class</span>, NavigableMap.<span class="keyword">class</span>);</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1907</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    }</pre></td></tr>
<tr>  <td class="numLine">&nbsp;1908</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;1909</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="comment">/**</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1910</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * Get the {@code byte[]} key in the underlying key/value store corresponding to the specified object.</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1911</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1912</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * &lt;p&gt;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1913</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * Notes:</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1914</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * &lt;ul&gt;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1915</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *  &lt;li&gt;This method does not check whether {@code id} is valid or the object actually exists.&lt;/li&gt;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1916</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *  &lt;li&gt;Objects utilize mutiple keys; the return value is the common prefix of all such keys.&lt;/li&gt;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1917</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *  &lt;li&gt;The {@link org.jsimpledb.kv.KVDatabase} should not be modified directly, otherwise behavior is undefined&lt;/li&gt;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1918</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * &lt;/ul&gt;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1919</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1920</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @param id object ID</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1921</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @return the {@link org.jsimpledb.kv.KVDatabase} key corresponding to {@code id}</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1922</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @throws IllegalArgumentException if {@code id} is null</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1923</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     */</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1924</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="keyword">public</span> <span class="keyword">byte</span>[] getKey(ObjId id) {</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1925</td>  <td class="nbHitsUncovered"><a title="Line 1925: Conditional coverage 0% (0/2).">&nbsp;0</a></td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;<a title="Line 1925: Conditional coverage 0% (0/2).">        <span class="keyword">if</span> (id == <span class="keyword">null</span>)</a></span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1926</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;            <span class="keyword">throw</span> <span class="keyword">new</span> IllegalArgumentException(<span class="string">"null id"</span>);</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1927</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;        <span class="keyword">return</span> id.getBytes();</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1928</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    }</pre></td></tr>
<tr>  <td class="numLine">&nbsp;1929</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;1930</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="comment">/**</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1931</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * Get the {@code byte[]} key in the underlying key/value store corresponding to the specified field in the specified object.</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1932</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1933</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * &lt;p&gt;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1934</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * Notes:</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1935</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * &lt;ul&gt;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1936</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *  &lt;li&gt;This method does not check whether {@code id} is valid, the object exists,</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1937</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *      or the field actually exists in the object.&lt;/li&gt;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1938</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *  &lt;li&gt;Complex fields utilize mutiple keys; the return value is the common prefix of all such keys.&lt;/li&gt;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1939</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *  &lt;li&gt;The {@link org.jsimpledb.kv.KVDatabase} should not be modified directly, otherwise behavior is undefined&lt;/li&gt;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1940</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * &lt;/ul&gt;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1941</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1942</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @param id object ID</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1943</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @param storageId field storage ID</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1944</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @return the {@link org.jsimpledb.kv.KVDatabase} key of the field in the specified object</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1945</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @throws UnknownFieldException if no field corresponding to {@code storageId} exists</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1946</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @throws IllegalArgumentException if {@code storageId} corresponds to a sub-field of a complex field</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1947</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @throws IllegalArgumentException if {@code storageId} is less than or equal to zero</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1948</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @throws IllegalArgumentException if {@code id} is null</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1949</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     */</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1950</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="keyword">public</span> <span class="keyword">byte</span>[] getKey(ObjId id, <span class="keyword">int</span> storageId) {</pre></td></tr>
<tr>  <td class="numLine">&nbsp;1951</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;1952</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        <span class="comment">// Sanity check</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1953</td>  <td class="nbHitsUncovered"><a title="Line 1953: Conditional coverage 0% (0/2).">&nbsp;0</a></td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;<a title="Line 1953: Conditional coverage 0% (0/2).">        <span class="keyword">if</span> (id == <span class="keyword">null</span>)</a></span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1954</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;            <span class="keyword">throw</span> <span class="keyword">new</span> IllegalArgumentException(<span class="string">"null id"</span>);</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1955</td>  <td class="nbHitsUncovered"><a title="Line 1955: Conditional coverage 0% (0/2).">&nbsp;0</a></td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;<a title="Line 1955: Conditional coverage 0% (0/2).">        <span class="keyword">if</span> (storageId &lt;= 0)</a></span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1956</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;            <span class="keyword">throw</span> <span class="keyword">new</span> IllegalArgumentException(<span class="string">"storageId &lt;= 0"</span>);</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1957</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;        <span class="keyword">final</span> FieldStorageInfo info = <span class="keyword">this</span>.schemas.verifyStorageInfo(storageId, FieldStorageInfo.<span class="keyword">class</span>);</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1958</td>  <td class="nbHitsUncovered"><a title="Line 1958: Conditional coverage 0% (0/2).">&nbsp;0</a></td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;<a title="Line 1958: Conditional coverage 0% (0/2).">        <span class="keyword">if</span> (info.isSubField())</a></span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1959</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;            <span class="keyword">throw</span> <span class="keyword">new</span> IllegalArgumentException(<span class="string">"field is a sub-field of a complex field"</span>);</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1960</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;1961</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        <span class="comment">// Build key</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1962</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;        <span class="keyword">final</span> ByteWriter writer = <span class="keyword">new</span> ByteWriter();</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1963</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;        id.writeTo(writer);</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1964</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;        UnsignedIntEncoder.write(writer, storageId);</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1965</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;        <span class="keyword">return</span> writer.getBytes();</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1966</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    }</pre></td></tr>
<tr>  <td class="numLine">&nbsp;1967</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;1968</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="keyword">boolean</span> hasDefaultValue(ObjId id, SimpleField&lt;?&gt; field) {</pre></td></tr>
<tr>  <td class="numLine">&nbsp;1969</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;1970</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        <span class="comment">// Sanity check</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1971</td>  <td class="nbHitsUncovered"><a title="Line 1971: Conditional coverage 0% (0/2).">&nbsp;0</a></td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;<a title="Line 1971: Conditional coverage 0% (0/2).">        <span class="keyword">if</span> (<span class="keyword">this</span>.stale)</a></span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1972</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;            <span class="keyword">throw</span> <span class="keyword">new</span> StaleTransactionException(<span class="keyword">this</span>);</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1973</td>  <td class="nbHitsUncovered"><a title="Line 1973: Conditional coverage 0% (0/2).">&nbsp;0</a></td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;<a title="Line 1973: Conditional coverage 0% (0/2).">        <span class="keyword">if</span> (id == <span class="keyword">null</span>)</a></span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1974</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;            <span class="keyword">throw</span> <span class="keyword">new</span> IllegalArgumentException(<span class="string">"null id"</span>);</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1975</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;1976</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        <span class="comment">// Get object info to verify object exists</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1977</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;        <span class="keyword">final</span> ObjInfo info = <span class="keyword">this</span>.getObjectInfo(id, <span class="keyword">false</span>);</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1978</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;1979</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        <span class="comment">// Check whether non-default value stored in field</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1980</td>  <td class="nbHitsUncovered"><a title="Line 1980: Conditional coverage 0% (0/2).">&nbsp;0</a></td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;<a title="Line 1980: Conditional coverage 0% (0/2).">        <span class="keyword">return</span> <span class="keyword">this</span>.kvt.get(field.buildKey(id)) == <span class="keyword">null</span>;</a></span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1981</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    }</pre></td></tr>
<tr>  <td class="numLine">&nbsp;1982</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;1983</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="keyword">private</span> <span class="keyword">synchronized</span> &lt;F, V&gt; V readComplexField(ObjId id,</pre></td></tr>
<tr>  <td class="numLine">&nbsp;1984</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;      <span class="keyword">int</span> storageId, <span class="keyword">boolean</span> updateVersion, Class&lt;F&gt; fieldClass, Class&lt;V&gt; valueType) {</pre></td></tr>
<tr>  <td class="numLine">&nbsp;1985</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;1986</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        <span class="comment">// Sanity check</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1987</td>  <td class="nbHitsUncovered"><a title="Line 1987: Conditional coverage 0% (0/2).">&nbsp;0</a></td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;<a title="Line 1987: Conditional coverage 0% (0/2).">        <span class="keyword">if</span> (<span class="keyword">this</span>.stale)</a></span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1988</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;            <span class="keyword">throw</span> <span class="keyword">new</span> StaleTransactionException(<span class="keyword">this</span>);</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1989</td>  <td class="nbHitsUncovered"><a title="Line 1989: Conditional coverage 0% (0/2).">&nbsp;0</a></td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;<a title="Line 1989: Conditional coverage 0% (0/2).">        <span class="keyword">if</span> (id == <span class="keyword">null</span>)</a></span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1990</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;            <span class="keyword">throw</span> <span class="keyword">new</span> IllegalArgumentException(<span class="string">"null id"</span>);</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1991</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;1992</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        <span class="comment">// Get object info</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1993</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;        <span class="keyword">final</span> ObjInfo info = <span class="keyword">this</span>.getObjectInfo(id, updateVersion);</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1994</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;1995</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        <span class="comment">// Get field</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1996</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;        <span class="keyword">final</span> ComplexField&lt;?&gt; field = info.getObjType().complexFields.get(storageId);</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1997</td>  <td class="nbHitsUncovered"><a title="Line 1997: Conditional coverage 0% (0/2).">&nbsp;0</a></td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;<a title="Line 1997: Conditional coverage 0% (0/2).">        <span class="keyword">if</span> (!fieldClass.isInstance(field))</a></span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1998</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;            <span class="keyword">throw</span> <span class="keyword">new</span> UnknownFieldException(info.getObjType(), storageId, fieldClass.getSimpleName());</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1999</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;2000</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        <span class="comment">// Return view</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;2001</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;        <span class="keyword">return</span> valueType.cast(field.getValueInternal(<span class="keyword">this</span>, id));</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2002</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    }</pre></td></tr>
<tr>  <td class="numLine">&nbsp;2003</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;2004</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="comment">/**</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2005</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * Read an object's meta-data, updating its schema version it in the process if requested.</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2006</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2007</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @param id object ID of the object</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2008</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @param update true to update object's schema version to match this transaction, false to leave it alone</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2009</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @return object info</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2010</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @throws UnknownTypeException if object ID specifies an unknown object type</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2011</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @throws DeletedObjectException if no object with ID equal to {@code id} is found</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2012</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @throws IllegalArgumentException if {@code id} is null</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2013</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     */</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2014</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="keyword">private</span> ObjInfo getObjectInfo(ObjId id, <span class="keyword">boolean</span> update) {</pre></td></tr>
<tr>  <td class="numLine">&nbsp;2015</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;2016</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        <span class="comment">// Check object type</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;2017</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;        <span class="keyword">this</span>.schemas.verifyStorageInfo(id.getStorageId(), ObjTypeStorageInfo.<span class="keyword">class</span>);</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2018</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;2019</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        <span class="comment">// Check schema version</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;2020</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;        <span class="keyword">final</span> ObjInfo info = <span class="keyword">new</span> ObjInfo(<span class="keyword">this</span>, id);</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;2021</td>  <td class="nbHitsUncovered"><a title="Line 2021: Conditional coverage 0% (0/4) [each condition: 0%, 0%].">&nbsp;0</a></td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;<a title="Line 2021: Conditional coverage 0% (0/4) [each condition: 0%, 0%].">        <span class="keyword">if</span> (!update || info.getSchema() == <span class="keyword">this</span>.schema)</a></span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;2022</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;            <span class="keyword">return</span> info;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2023</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;2024</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        <span class="comment">// Update schema version</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;2025</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;        <span class="keyword">this</span>.mutateAndNotify(<span class="keyword">new</span> Mutation&lt;Void&gt;() {</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2026</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;            @Override</pre></td></tr>
<tr>  <td class="numLine">&nbsp;2027</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;            <span class="keyword">public</span> Void mutate() {</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;2028</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;                Transaction.<span class="keyword">this</span>.updateVersion(info, Transaction.<span class="keyword">this</span>.schema);</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;2029</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;                <span class="keyword">return</span> <span class="keyword">null</span>;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2030</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;            }</pre></td></tr>
<tr>  <td class="numLine">&nbsp;2031</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        });</pre></td></tr>
<tr>  <td class="numLine">&nbsp;2032</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;2033</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        <span class="comment">// Get updated object info</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;2034</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;        <span class="keyword">return</span> <span class="keyword">new</span> ObjInfo(<span class="keyword">this</span>, id);</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2035</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    }</pre></td></tr>
<tr>  <td class="numLine">&nbsp;2036</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;2037</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">// Field Change Notifications</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2038</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;2039</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="comment">/**</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2040</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * Monitor for changes within this transaction of the value of the given field, as seen through a path of references.</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2041</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2042</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * &lt;p&gt;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2043</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * When the specified field is changed, a listener notification will be delivered for each referring object that</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2044</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * refers to the object containing the changed field through the specified path of references. Notifications are</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2045</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * delivered at the end of the mutation operation just prior to returning to the caller. If the listener method</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2046</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * performs additional mutation(s) which are themselves being listened for, those notifications will also be delivered</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2047</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * prior to the returning to the original caller. Therefore, care must be taken to avoid change notification dependency</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2048</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * loops when listeners can themselves mutate fields, to avoid infinite loops.</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2049</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * &lt;/p&gt;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2050</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2051</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * &lt;p&gt;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2052</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * If a non-null {@code types} is provided, then only objects whose types have one of the specified storage ID's</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2053</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * will trigger notifications to {@code listener}.</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2054</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * &lt;/p&gt;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2055</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2056</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * &lt;p&gt;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2057</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * A referring object may refer to the changed object through more than one actual path of references matching {@code path};</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2058</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * if so, it will still appear only once in the {@link NavigableSet} provided to the listener (this is of course required</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2059</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * by set semantics).</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2060</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * &lt;/p&gt;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2061</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2062</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * &lt;p&gt;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2063</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * Although the reference back-tracking algorithm does consolidate multiple paths between the same two objects,</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2064</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * be careful to avoid an explosion of notifications when objects in the {@code path} have a high degree of fan-in.</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2065</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * &lt;/p&gt;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2066</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2067</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * &lt;p&gt;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2068</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * When a {@link ReferenceField} in {@code path} also happens to be the field being changed, then there is ambiguity</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2069</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * about how the set of referring objects is calculated: does it use the field's value before or after the change?</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2070</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * This API guarantees that the answer is "after the change"; however, if another listener on the same field is</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2071</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * invoked before {@code listener} and mutates any reference field(s) in {@code path}, then whether that additional</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2072</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * change is also be included in the calculation is undefined.</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2073</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * &lt;/p&gt;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2074</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2075</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * &lt;p&gt;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2076</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * Therefore, for consistency, avoid changing any {@link ReferenceField} from within a listener callback when that</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2077</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * field is also in some other listener's reference path, and both listeners are watching the same field.</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2078</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * &lt;/p&gt;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2079</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2080</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @param storageId storage ID of the field to monitor</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2081</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @param path path of reference fields (represented by storage IDs) through which to monitor field</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2082</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @param types set of allowed storage IDs for the changed object, or null for no restriction</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2083</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @param listener callback for notifications on changes in value</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2084</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @throws UnknownFieldException if no {@link SimpleField} corresponding to {@code storageId} exists</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2085</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @throws UnknownFieldException if {@code path} contains a storage ID that does not correspond to a {@link ReferenceField}</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2086</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @throws IllegalArgumentException if {@code storageId} refers to a sub-field of a complex field</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2087</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @throws IllegalArgumentException if {@code path} or {@code listener} is null</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2088</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @throws StaleTransactionException if this transaction is no longer usable</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2089</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     */</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2090</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="keyword">public</span> <span class="keyword">synchronized</span> <span class="keyword">void</span> addSimpleFieldChangeListener(<span class="keyword">int</span> storageId, <span class="keyword">int</span>[] path, Iterable&lt;Integer&gt; types,</pre></td></tr>
<tr>  <td class="numLine">&nbsp;2091</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;      SimpleFieldChangeListener listener) {</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;2092</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;        <span class="keyword">this</span>.validateChangeListener(SimpleField.<span class="keyword">class</span>, storageId, path, listener);</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;2093</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;        <span class="keyword">this</span>.getMonitorsForField(storageId, <span class="keyword">true</span>).add(<span class="keyword">new</span> FieldMonitor(storageId, path, types, listener));</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;2094</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;    }</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2095</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;2096</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="comment">/**</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2097</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * Monitor for changes within this transaction to the specified {@link SetField} as seen through a path of references.</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2098</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2099</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * &lt;p&gt;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2100</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * See {@link #addSimpleFieldChangeListener addSimpleFieldChangeListener()} for details on how notifications are delivered.</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2101</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * &lt;/p&gt;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2102</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2103</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @param storageId storage ID of the field to monitor</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2104</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @param path path of reference fields (represented by storage IDs) through which to monitor field</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2105</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @param types set of allowed storage IDs for the changed object, or null for no restriction</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2106</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @param listener callback for notifications on changes in value</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2107</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @throws UnknownFieldException if no {@link SetField} corresponding to {@code storageId} exists</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2108</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @throws UnknownFieldException if {@code path} contains a storage ID that does not correspond to a {@link ReferenceField}</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2109</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @throws IllegalArgumentException if {@code storageId} refers to a sub-field of a complex field</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2110</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @throws IllegalArgumentException if {@code path} or {@code listener} is null</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2111</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @throws StaleTransactionException if this transaction is no longer usable</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2112</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     */</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2113</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="keyword">public</span> <span class="keyword">synchronized</span> <span class="keyword">void</span> addSetFieldChangeListener(<span class="keyword">int</span> storageId, <span class="keyword">int</span>[] path, Iterable&lt;Integer&gt; types,</pre></td></tr>
<tr>  <td class="numLine">&nbsp;2114</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;      SetFieldChangeListener listener) {</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;2115</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;        <span class="keyword">this</span>.validateChangeListener(SetField.<span class="keyword">class</span>, storageId, path, listener);</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;2116</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;        <span class="keyword">this</span>.getMonitorsForField(storageId, <span class="keyword">true</span>).add(<span class="keyword">new</span> FieldMonitor(storageId, path, types, listener));</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;2117</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;    }</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2118</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;2119</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="comment">/**</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2120</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * Monitor for changes within this transaction to the specified {@link ListField} as seen through a path of references.</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2121</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2122</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * &lt;p&gt;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2123</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * See {@link #addSimpleFieldChangeListener addSimpleFieldChangeListener()} for details on how notifications are delivered.</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2124</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * &lt;/p&gt;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2125</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2126</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @param storageId storage ID of the field to monitor</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2127</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @param path path of reference fields (represented by storage IDs) through which to monitor field</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2128</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @param types set of allowed storage IDs for the changed object, or null for no restriction</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2129</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @param listener callback for notifications on changes in value</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2130</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @throws UnknownFieldException if no {@link ListField} corresponding to {@code storageId} exists</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2131</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @throws UnknownFieldException if {@code path} contains a storage ID that does not correspond to a {@link ReferenceField}</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2132</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @throws IllegalArgumentException if {@code storageId} refers to a sub-field of a complex field</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2133</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @throws IllegalArgumentException if {@code path} or {@code listener} is null</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2134</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @throws StaleTransactionException if this transaction is no longer usable</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2135</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     */</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2136</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="keyword">public</span> <span class="keyword">synchronized</span> <span class="keyword">void</span> addListFieldChangeListener(<span class="keyword">int</span> storageId, <span class="keyword">int</span>[] path, Iterable&lt;Integer&gt; types,</pre></td></tr>
<tr>  <td class="numLine">&nbsp;2137</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;      ListFieldChangeListener listener) {</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;2138</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;        <span class="keyword">this</span>.validateChangeListener(ListField.<span class="keyword">class</span>, storageId, path, listener);</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;2139</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;        <span class="keyword">this</span>.getMonitorsForField(storageId, <span class="keyword">true</span>).add(<span class="keyword">new</span> FieldMonitor(storageId, path, types, listener));</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;2140</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;    }</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2141</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;2142</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="comment">/**</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2143</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * Monitor for changes within this transaction to the specified {@link MapField} as seen through a path of references.</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2144</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2145</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * &lt;p&gt;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2146</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * See {@link #addSimpleFieldChangeListener addSimpleFieldChangeListener()} for details on how notifications are delivered.</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2147</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * &lt;/p&gt;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2148</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2149</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @param storageId storage ID of the field to monitor</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2150</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @param path path of reference fields (represented by storage IDs) through which to monitor field</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2151</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @param types set of allowed storage IDs for the changed object, or null for no restriction</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2152</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @param listener callback for notifications on changes in value</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2153</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @throws UnknownFieldException if no {@link MapField} corresponding to {@code storageId} exists</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2154</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @throws UnknownFieldException if {@code path} contains a storage ID that does not correspond to a {@link ReferenceField}</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2155</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @throws IllegalArgumentException if {@code storageId} refers to a sub-field of a complex field</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2156</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @throws IllegalArgumentException if {@code path} or {@code listener} is null</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2157</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @throws StaleTransactionException if this transaction is no longer usable</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2158</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     */</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2159</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="keyword">public</span> <span class="keyword">synchronized</span> <span class="keyword">void</span> addMapFieldChangeListener(<span class="keyword">int</span> storageId, <span class="keyword">int</span>[] path, Iterable&lt;Integer&gt; types,</pre></td></tr>
<tr>  <td class="numLine">&nbsp;2160</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;      MapFieldChangeListener listener) {</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;2161</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;        <span class="keyword">this</span>.validateChangeListener(MapField.<span class="keyword">class</span>, storageId, path, listener);</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;2162</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;        <span class="keyword">this</span>.getMonitorsForField(storageId, <span class="keyword">true</span>).add(<span class="keyword">new</span> FieldMonitor(storageId, path, types, listener));</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;2163</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;    }</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2164</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;2165</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="comment">/**</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2166</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * Remove a monitor previously added via {@link #addSimpleFieldChangeListener addSimpleFieldChangeListener()}.</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2167</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2168</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @param storageId storage ID of the field to no longer monitor</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2169</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @param path path of reference fields (represented by storage IDs) through which to monitor field</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2170</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @param types set of allowed storage IDs for the changed object, or null for no restriction</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2171</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @param listener callback for notifications on changes in value</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2172</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @throws UnknownFieldException if no {@link SimpleField} corresponding to {@code storageId} exists</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2173</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @throws UnknownFieldException if {@code path} contains a storage ID that does not correspond to a {@link ReferenceField}</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2174</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @throws IllegalArgumentException if {@code storageId} refers to a sub-field of a complex field</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2175</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @throws IllegalArgumentException if {@code path} or {@code listener} is null</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2176</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @throws StaleTransactionException if this transaction is no longer usable</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2177</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     */</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2178</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="keyword">public</span> <span class="keyword">synchronized</span> <span class="keyword">void</span> removeSimpleFieldChangeListener(<span class="keyword">int</span> storageId, <span class="keyword">int</span>[] path, Iterable&lt;Integer&gt; types,</pre></td></tr>
<tr>  <td class="numLine">&nbsp;2179</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;      SimpleFieldChangeListener listener) {</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;2180</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;        <span class="keyword">this</span>.validateChangeListener(SimpleField.<span class="keyword">class</span>, storageId, path, listener);</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;2181</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;        <span class="keyword">this</span>.getMonitorsForField(storageId, <span class="keyword">false</span>).remove(<span class="keyword">new</span> FieldMonitor(storageId, path, types, listener));</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;2182</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;    }</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2183</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;2184</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="comment">/**</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2185</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * Remove a monitor previously added via {@link #addSetFieldChangeListener addSetFieldChangeListener()}.</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2186</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2187</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @param storageId storage ID of the field to no longer monitor</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2188</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @param path path of reference fields (represented by storage IDs) through which to monitor field</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2189</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @param types set of allowed storage IDs for the changed object, or null for no restriction</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2190</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @param listener callback for notifications on changes in value</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2191</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @throws UnknownFieldException if no {@link SetField} corresponding to {@code storageId} exists</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2192</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @throws UnknownFieldException if {@code path} contains a storage ID that does not correspond to a {@link ReferenceField}</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2193</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @throws IllegalArgumentException if {@code storageId} refers to a sub-field of a complex field</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2194</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @throws IllegalArgumentException if {@code path} or {@code listener} is null</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2195</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @throws StaleTransactionException if this transaction is no longer usable</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2196</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     */</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2197</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="keyword">public</span> <span class="keyword">synchronized</span> <span class="keyword">void</span> removeSetFieldChangeListener(<span class="keyword">int</span> storageId, <span class="keyword">int</span>[] path, Iterable&lt;Integer&gt; types,</pre></td></tr>
<tr>  <td class="numLine">&nbsp;2198</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;      SetFieldChangeListener listener) {</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;2199</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;        <span class="keyword">this</span>.validateChangeListener(SetField.<span class="keyword">class</span>, storageId, path, listener);</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;2200</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;        <span class="keyword">this</span>.getMonitorsForField(storageId, <span class="keyword">false</span>).remove(<span class="keyword">new</span> FieldMonitor(storageId, path, types, listener));</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;2201</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;    }</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2202</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;2203</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="comment">/**</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2204</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * Remove a monitor previously added via {@link #addListFieldChangeListener addListFieldChangeListener()}.</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2205</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2206</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @param storageId storage ID of the field to no longer monitor</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2207</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @param path path of reference fields (represented by storage IDs) through which to monitor field</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2208</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @param types set of allowed storage IDs for the changed object, or null for no restriction</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2209</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @param listener callback for notifications on changes in value</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2210</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @throws UnknownFieldException if no {@link ListField} corresponding to {@code storageId} exists</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2211</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @throws UnknownFieldException if {@code path} contains a storage ID that does not correspond to a {@link ReferenceField}</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2212</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @throws IllegalArgumentException if {@code storageId} refers to a sub-field of a complex field</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2213</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @throws IllegalArgumentException if {@code path} or {@code listener} is null</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2214</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @throws StaleTransactionException if this transaction is no longer usable</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2215</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     */</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2216</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="keyword">public</span> <span class="keyword">synchronized</span> <span class="keyword">void</span> removeListFieldChangeListener(<span class="keyword">int</span> storageId, <span class="keyword">int</span>[] path, Iterable&lt;Integer&gt; types,</pre></td></tr>
<tr>  <td class="numLine">&nbsp;2217</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;      ListFieldChangeListener listener) {</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;2218</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;        <span class="keyword">this</span>.validateChangeListener(ListField.<span class="keyword">class</span>, storageId, path, listener);</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;2219</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;        <span class="keyword">this</span>.getMonitorsForField(storageId, <span class="keyword">false</span>).remove(<span class="keyword">new</span> FieldMonitor(storageId, path, types, listener));</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;2220</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;    }</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2221</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;2222</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="comment">/**</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2223</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * Remove a monitor previously added via {@link #addMapFieldChangeListener addMapFieldChangeListener()}.</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2224</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2225</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @param storageId storage ID of the field to no longer monitor</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2226</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @param path path of reference fields (represented by storage IDs) through which to monitor field</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2227</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @param types set of allowed storage IDs for the changed object, or null for no restriction</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2228</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @param listener callback for notifications on changes in value</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2229</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @throws UnknownFieldException if no {@link MapField} corresponding to {@code storageId} exists</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2230</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @throws UnknownFieldException if {@code path} contains a storage ID that does not correspond to a {@link ReferenceField}</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2231</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @throws IllegalArgumentException if {@code storageId} refers to a sub-field of a complex field</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2232</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @throws IllegalArgumentException if {@code path} or {@code listener} is null</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2233</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @throws StaleTransactionException if this transaction is no longer usable</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2234</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     */</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2235</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="keyword">public</span> <span class="keyword">synchronized</span> <span class="keyword">void</span> removeMapFieldChangeListener(<span class="keyword">int</span> storageId, <span class="keyword">int</span>[] path, Iterable&lt;Integer&gt; types,</pre></td></tr>
<tr>  <td class="numLine">&nbsp;2236</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;      MapFieldChangeListener listener) {</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;2237</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;        <span class="keyword">this</span>.validateChangeListener(MapField.<span class="keyword">class</span>, storageId, path, listener);</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;2238</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;        <span class="keyword">this</span>.getMonitorsForField(storageId, <span class="keyword">false</span>).remove(<span class="keyword">new</span> FieldMonitor(storageId, path, types, listener));</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;2239</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;    }</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2240</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;2241</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="keyword">private</span> &lt;T <span class="keyword">extends</span> Field&lt;?&gt;&gt; <span class="keyword">void</span> validateChangeListener(Class&lt;T&gt; expectedFieldType,</pre></td></tr>
<tr>  <td class="numLine">&nbsp;2242</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;      <span class="keyword">int</span> storageId, <span class="keyword">int</span>[] path, Object listener) {</pre></td></tr>
<tr>  <td class="numLine">&nbsp;2243</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;2244</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        <span class="comment">// Sanity check</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;2245</td>  <td class="nbHitsUncovered"><a title="Line 2245: Conditional coverage 0% (0/2).">&nbsp;0</a></td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;<a title="Line 2245: Conditional coverage 0% (0/2).">        <span class="keyword">if</span> (<span class="keyword">this</span>.stale)</a></span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;2246</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;            <span class="keyword">throw</span> <span class="keyword">new</span> StaleTransactionException(<span class="keyword">this</span>);</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;2247</td>  <td class="nbHitsUncovered"><a title="Line 2247: Conditional coverage 0% (0/2).">&nbsp;0</a></td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;<a title="Line 2247: Conditional coverage 0% (0/2).">        <span class="keyword">if</span> (path == <span class="keyword">null</span>)</a></span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;2248</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;            <span class="keyword">throw</span> <span class="keyword">new</span> IllegalArgumentException(<span class="string">"null path"</span>);</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;2249</td>  <td class="nbHitsUncovered"><a title="Line 2249: Conditional coverage 0% (0/2).">&nbsp;0</a></td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;<a title="Line 2249: Conditional coverage 0% (0/2).">        <span class="keyword">if</span> (listener == <span class="keyword">null</span>)</a></span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;2250</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;            <span class="keyword">throw</span> <span class="keyword">new</span> IllegalArgumentException(<span class="string">"null listener"</span>);</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2251</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;2252</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        <span class="comment">// Get target field info</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;2253</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;        <span class="keyword">final</span> FieldStorageInfo fieldInfo = <span class="keyword">this</span>.schemas.verifyStorageInfo(storageId, SchemaItem.infoTypeFor(expectedFieldType));</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2254</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;2255</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        <span class="comment">// Get object parent of target field, and make sure the field is not a sub-field</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;2256</td>  <td class="nbHitsUncovered"><a title="Line 2256: Conditional coverage 0% (0/2).">&nbsp;0</a></td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;<a title="Line 2256: Conditional coverage 0% (0/2).">        <span class="keyword">if</span> (fieldInfo.isSubField()) {</a></span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;2257</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;            <span class="keyword">throw</span> <span class="keyword">new</span> IllegalArgumentException(<span class="string">"the field with storage ID "</span></span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2258</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;              + storageId + <span class="string">" is a sub-field of a complex field; listeners can only be registered on regular object fields"</span>);</pre></td></tr>
<tr>  <td class="numLine">&nbsp;2259</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        }</pre></td></tr>
<tr>  <td class="numLine">&nbsp;2260</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;2261</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        <span class="comment">// Verify all fields in the path are reference fields</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;2262</td>  <td class="nbHitsUncovered"><a title="Line 2262: Conditional coverage 0% (0/2).">&nbsp;0</a></td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;<a title="Line 2262: Conditional coverage 0% (0/2).">        <span class="keyword">for</span> (<span class="keyword">int</span> pathStorageId : path)</a></span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;2263</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;            <span class="keyword">this</span>.schemas.verifyStorageInfo(pathStorageId, ReferenceFieldStorageInfo.<span class="keyword">class</span>);</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;2264</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;    }</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2265</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;2266</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="keyword">private</span> <span class="keyword">synchronized</span> HashSet&lt;FieldMonitor&gt; getMonitorsForField(<span class="keyword">int</span> storageId, <span class="keyword">boolean</span> adding) {</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;2267</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;        HashSet&lt;FieldMonitor&gt; monitors = <span class="keyword">this</span>.monitorMap.get(storageId);</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;2268</td>  <td class="nbHitsUncovered"><a title="Line 2268: Conditional coverage 0% (0/2).">&nbsp;0</a></td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;<a title="Line 2268: Conditional coverage 0% (0/2).">        <span class="keyword">if</span> (monitors == <span class="keyword">null</span>) {</a></span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;2269</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;            monitors = <span class="keyword">new</span> HashSet&lt;FieldMonitor&gt;();</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;2270</td>  <td class="nbHitsUncovered"><a title="Line 2270: Conditional coverage 0% (0/2).">&nbsp;0</a></td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;<a title="Line 2270: Conditional coverage 0% (0/2).">            <span class="keyword">if</span> (adding)</a></span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;2271</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;                <span class="keyword">this</span>.monitorMap.put(storageId, monitors);</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2272</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        }</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;2273</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;        <span class="keyword">return</span> monitors;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2274</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    }</pre></td></tr>
<tr>  <td class="numLine">&nbsp;2275</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;2276</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="comment">/**</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2277</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * Add a pending notification for any {@link FieldMonitor}s watching the specified field in the specified object.</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2278</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * This method assumes only the appropriate type of monitor is registered as a listener on the field</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2279</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * and that the provided old and new values have the appropriate types.</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2280</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     */</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2281</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="keyword">void</span> addFieldChangeNotification(FieldChangeNotifier notifier) {</pre></td></tr>
<tr>  <td class="numLine">&nbsp;2282</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;2283</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        <span class="comment">// Does anybody care?</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;2284</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;        <span class="keyword">final</span> <span class="keyword">int</span> storageId = notifier.getStorageId();</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;2285</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;        HashSet&lt;FieldMonitor&gt; monitors = <span class="keyword">this</span>.monitorMap.get(storageId);</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;2286</td>  <td class="nbHitsUncovered"><a title="Line 2286: Conditional coverage 0% (0/4) [each condition: 0%, 0%].">&nbsp;0</a></td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;<a title="Line 2286: Conditional coverage 0% (0/4) [each condition: 0%, 0%].">        <span class="keyword">if</span> (monitors == <span class="keyword">null</span> || !Iterables.any(monitors, <span class="keyword">new</span> MonitoredPredicate(notifier.getId(), storageId)))</a></span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;2287</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;            <span class="keyword">return</span>;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2288</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;2289</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        <span class="comment">// Add a pending field monitor notification for the specified field</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;2290</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;        <span class="keyword">final</span> TreeMap&lt;Integer, ArrayList&lt;FieldChangeNotifier&gt;&gt; pendingNotificationMap = <span class="keyword">this</span>.pendingNotifications.get();</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;2291</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;        ArrayList&lt;FieldChangeNotifier&gt; pendingNotificationList = pendingNotificationMap.get(storageId);</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;2292</td>  <td class="nbHitsUncovered"><a title="Line 2292: Conditional coverage 0% (0/2).">&nbsp;0</a></td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;<a title="Line 2292: Conditional coverage 0% (0/2).">        <span class="keyword">if</span> (pendingNotificationList == <span class="keyword">null</span>) {</a></span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;2293</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;            pendingNotificationList = <span class="keyword">new</span> ArrayList&lt;FieldChangeNotifier&gt;(2);</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;2294</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;            pendingNotificationMap.put(storageId, pendingNotificationList);</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2295</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        }</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;2296</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;        pendingNotificationList.add(notifier);</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;2297</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;    }</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2298</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;2299</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="comment">/**</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2300</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * Determine if there are any monitors watching the specified field.</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2301</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     */</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2302</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="keyword">boolean</span> hasFieldMonitor(ObjId id, Field&lt;?&gt; field) {</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;2303</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;        <span class="keyword">final</span> HashSet&lt;FieldMonitor&gt; monitors = <span class="keyword">this</span>.monitorMap.get(field.storageId);</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;2304</td>  <td class="nbHitsUncovered"><a title="Line 2304: Conditional coverage 0% (0/4) [each condition: 0%, 0%].">&nbsp;0</a></td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;<a title="Line 2304: Conditional coverage 0% (0/4) [each condition: 0%, 0%].">        <span class="keyword">return</span> monitors != <span class="keyword">null</span> &amp;&amp; Iterables.any(monitors, <span class="keyword">new</span> MonitoredPredicate(id, field.storageId));</a></span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2305</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    }</pre></td></tr>
<tr>  <td class="numLine">&nbsp;2306</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;2307</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="comment">/**</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2308</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * Determine if there are any monitors watching any field in the specified type.</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2309</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     */</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2310</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="keyword">boolean</span> hasFieldMonitor(ObjType objType) {</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;2311</td>  <td class="nbHitsUncovered"><a title="Line 2311: Conditional coverage 0% (0/2).">&nbsp;0</a></td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;<a title="Line 2311: Conditional coverage 0% (0/2).">        <span class="keyword">for</span> (<span class="keyword">int</span> storageId : NavigableSets.intersection(objType.fields.navigableKeySet(), <span class="keyword">this</span>.monitorMap.navigableKeySet())) {</a></span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;2312</td>  <td class="nbHitsUncovered"><a title="Line 2312: Conditional coverage 0% (0/2).">&nbsp;0</a></td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;<a title="Line 2312: Conditional coverage 0% (0/2).">            <span class="keyword">if</span> (Iterables.any(<span class="keyword">this</span>.monitorMap.get(storageId), <span class="keyword">new</span> MonitoredPredicate(ObjId.getMin(objType.storageId), storageId)))</a></span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;2313</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;                <span class="keyword">return</span> <span class="keyword">true</span>;</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;2314</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;        }</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;2315</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;        <span class="keyword">return</span> <span class="keyword">false</span>;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2316</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    }</pre></td></tr>
<tr>  <td class="numLine">&nbsp;2317</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;2318</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="comment">/**</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2319</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * Perform some action and, when entirely done (including re-entrant invocation), issue pending notifications to monitors.</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2320</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2321</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @param id object containing the mutated field; will be validated</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2322</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @param mutation change to apply</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2323</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @throws ReadOnlyTransactionException if this transaction has been {@linkplain #setReadOnly set read-only}</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2324</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @throws StaleTransactionException if this transaction is no longer usable</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2325</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @throws IllegalArgumentException if {@code id} is null</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2326</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     */</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2327</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="keyword">synchronized</span> &lt;V&gt; V mutateAndNotify(ObjId id, Mutation&lt;V&gt; mutation) {</pre></td></tr>
<tr>  <td class="numLine">&nbsp;2328</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;2329</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        <span class="comment">// Verify object exists</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;2330</td>  <td class="nbHitsUncovered"><a title="Line 2330: Conditional coverage 0% (0/2).">&nbsp;0</a></td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;<a title="Line 2330: Conditional coverage 0% (0/2).">        <span class="keyword">if</span> (id == <span class="keyword">null</span>)</a></span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;2331</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;            <span class="keyword">throw</span> <span class="keyword">new</span> IllegalArgumentException(<span class="string">"null id"</span>);</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;2332</td>  <td class="nbHitsUncovered"><a title="Line 2332: Conditional coverage 0% (0/2).">&nbsp;0</a></td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;<a title="Line 2332: Conditional coverage 0% (0/2).">        <span class="keyword">if</span> (<span class="keyword">this</span>.stale)</a></span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;2333</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;            <span class="keyword">throw</span> <span class="keyword">new</span> StaleTransactionException(<span class="keyword">this</span>);</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;2334</td>  <td class="nbHitsUncovered"><a title="Line 2334: Conditional coverage 0% (0/2).">&nbsp;0</a></td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;<a title="Line 2334: Conditional coverage 0% (0/2).">        <span class="keyword">if</span> (<span class="keyword">this</span>.kvt.get(id.getBytes()) == <span class="keyword">null</span>)</a></span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;2335</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;            <span class="keyword">throw</span> <span class="keyword">new</span> DeletedObjectException(id);</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2336</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;2337</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        <span class="comment">// Perform mutation</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;2338</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;        <span class="keyword">return</span> <span class="keyword">this</span>.mutateAndNotify(mutation);</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2339</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    }</pre></td></tr>
<tr>  <td class="numLine">&nbsp;2340</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;2341</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="keyword">private</span> <span class="keyword">synchronized</span> &lt;V&gt; V mutateAndNotify(Mutation&lt;V&gt; mutation) {</pre></td></tr>
<tr>  <td class="numLine">&nbsp;2342</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;2343</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        <span class="comment">// Validate transaction</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;2344</td>  <td class="nbHitsUncovered"><a title="Line 2344: Conditional coverage 0% (0/2).">&nbsp;0</a></td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;<a title="Line 2344: Conditional coverage 0% (0/2).">        <span class="keyword">if</span> (<span class="keyword">this</span>.stale)</a></span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;2345</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;            <span class="keyword">throw</span> <span class="keyword">new</span> StaleTransactionException(<span class="keyword">this</span>);</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;2346</td>  <td class="nbHitsUncovered"><a title="Line 2346: Conditional coverage 0% (0/2).">&nbsp;0</a></td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;<a title="Line 2346: Conditional coverage 0% (0/2).">        <span class="keyword">if</span> (<span class="keyword">this</span>.readOnly)</a></span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;2347</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;            <span class="keyword">throw</span> <span class="keyword">new</span> ReadOnlyTransactionException(<span class="keyword">this</span>);</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2348</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;2349</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        <span class="comment">// If re-entrant invocation, we're already set up</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;2350</td>  <td class="nbHitsUncovered"><a title="Line 2350: Conditional coverage 0% (0/2).">&nbsp;0</a></td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;<a title="Line 2350: Conditional coverage 0% (0/2).">        <span class="keyword">if</span> (<span class="keyword">this</span>.pendingNotifications.get() != <span class="keyword">null</span>)</a></span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;2351</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;            <span class="keyword">return</span> mutation.mutate();</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2352</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;2353</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        <span class="comment">// Set up pending report list, perform mutation, and then issue reports</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;2354</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;        <span class="keyword">this</span>.pendingNotifications.set(<span class="keyword">new</span> TreeMap&lt;Integer, ArrayList&lt;FieldChangeNotifier&gt;&gt;());</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2355</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        <span class="keyword">try</span> {</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;2356</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;            <span class="keyword">return</span> mutation.mutate();</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2357</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        } <span class="keyword">finally</span> {</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;2358</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;            <span class="keyword">try</span> {</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;2359</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;                <span class="keyword">final</span> TreeMap&lt;Integer, ArrayList&lt;FieldChangeNotifier&gt;&gt; pendingNotificationMap = <span class="keyword">this</span>.pendingNotifications.get();</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;2360</td>  <td class="nbHitsUncovered"><a title="Line 2360: Conditional coverage 0% (0/2).">&nbsp;0</a></td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;<a title="Line 2360: Conditional coverage 0% (0/2).">                <span class="keyword">while</span> (!pendingNotificationMap.isEmpty()) {</a></span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2361</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;2362</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;                    <span class="comment">// Get the next field with pending notifications</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;2363</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;                    <span class="keyword">final</span> Map.Entry&lt;Integer, ArrayList&lt;FieldChangeNotifier&gt;&gt; entry = pendingNotificationMap.pollFirstEntry();</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;2364</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;                    <span class="keyword">final</span> <span class="keyword">int</span> storageId = entry.getKey();</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2365</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;2366</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;                    <span class="comment">// For all pending notifications, back-track references and notify all field monitors for the field</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;2367</td>  <td class="nbHitsUncovered"><a title="Line 2367: Conditional coverage 0% (0/2).">&nbsp;0</a></td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;<a title="Line 2367: Conditional coverage 0% (0/2).">                    <span class="keyword">for</span> (FieldChangeNotifier notifier : entry.getValue()) {</a></span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;2368</td>  <td class="nbHitsUncovered"><a title="Line 2368: Conditional coverage 0% (0/4) [each condition: 0%, 0%].">&nbsp;0</a></td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;<a title="Line 2368: Conditional coverage 0% (0/4) [each condition: 0%, 0%].">                        <span class="keyword">assert</span> notifier.getStorageId() == storageId;</a></span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;2369</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;                        <span class="keyword">final</span> ArrayList&lt;FieldMonitor&gt; monitorList = <span class="keyword">new</span> ArrayList&lt;&gt;(<span class="keyword">this</span>.getMonitorsForField(storageId, <span class="keyword">false</span>));</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;2370</td>  <td class="nbHitsUncovered"><a title="Line 2370: Conditional coverage 0% (0/2).">&nbsp;0</a></td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;<a title="Line 2370: Conditional coverage 0% (0/2).">                        <span class="keyword">if</span> (!monitorList.isEmpty())</a></span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;2371</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;                            <span class="keyword">this</span>.notifyFieldMonitors(notifier, NavigableSets.singleton(notifier.getId()), monitorList, 0);</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;2372</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;                    }</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;2373</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;                }</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2374</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;            } <span class="keyword">finally</span> {</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;2375</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;                <span class="keyword">this</span>.pendingNotifications.remove();</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;2376</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;            }</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2377</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        }</pre></td></tr>
<tr>  <td class="numLine">&nbsp;2378</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    }</pre></td></tr>
<tr>  <td class="numLine">&nbsp;2379</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;2380</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="comment">// Recursively back-track references along monitor paths and notify monitors when we reach the end (i.e., beginning)</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2381</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="keyword">private</span> <span class="keyword">void</span> notifyFieldMonitors(FieldChangeNotifier notifier,</pre></td></tr>
<tr>  <td class="numLine">&nbsp;2382</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;      NavigableSet&lt;ObjId&gt; objects, ArrayList&lt;FieldMonitor&gt; monitorList, <span class="keyword">int</span> step) {</pre></td></tr>
<tr>  <td class="numLine">&nbsp;2383</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;2384</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        <span class="comment">// Find the monitors for whom we have completed all the steps in their (inverse) path,</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2385</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        <span class="comment">// and group the remaining monitors by their next inverted reference path step.</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;2386</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;        <span class="keyword">final</span> HashMap&lt;Integer, ArrayList&lt;FieldMonitor&gt;&gt; remainingMonitorsMap = <span class="keyword">new</span> HashMap&lt;&gt;();</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;2387</td>  <td class="nbHitsUncovered"><a title="Line 2387: Conditional coverage 0% (0/2).">&nbsp;0</a></td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;<a title="Line 2387: Conditional coverage 0% (0/2).">        <span class="keyword">for</span> (FieldMonitor monitor : monitorList) {</a></span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2388</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;2389</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;            <span class="comment">// On the first step, apply the monitor's type filter, if any</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;2390</td>  <td class="nbHitsUncovered"><a title="Line 2390: Conditional coverage 0% (0/6) [each condition: 0%, 0%, 0%].">&nbsp;0</a></td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;<a title="Line 2390: Conditional coverage 0% (0/6) [each condition: 0%, 0%, 0%].">            <span class="keyword">if</span> (step == 0 &amp;&amp; monitor.types != <span class="keyword">null</span> &amp;&amp; !monitor.types.contains(notifier.getId().getBytes()))</a></span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;2391</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;                <span class="keyword">continue</span>;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2392</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;2393</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;            <span class="comment">// Issue notification callback if we have back-tracked through the whole path</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;2394</td>  <td class="nbHitsUncovered"><a title="Line 2394: Conditional coverage 0% (0/2).">&nbsp;0</a></td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;<a title="Line 2394: Conditional coverage 0% (0/2).">            <span class="keyword">if</span> (monitor.path.length == step) {</a></span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;2395</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;                notifier.notify(<span class="keyword">this</span>, monitor.listener, monitor.path, objects);</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;2396</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;                <span class="keyword">continue</span>;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2397</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;            }</pre></td></tr>
<tr>  <td class="numLine">&nbsp;2398</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;2399</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;            <span class="comment">// Sort the unfinished monitors by their next (i.e., previous) reference field</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;2400</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;            <span class="keyword">final</span> <span class="keyword">int</span> storageId = monitor.path[monitor.path.length - step - 1];</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;2401</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;            ArrayList&lt;FieldMonitor&gt; remainingMonitors = remainingMonitorsMap.get(storageId);</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;2402</td>  <td class="nbHitsUncovered"><a title="Line 2402: Conditional coverage 0% (0/2).">&nbsp;0</a></td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;<a title="Line 2402: Conditional coverage 0% (0/2).">            <span class="keyword">if</span> (remainingMonitors == <span class="keyword">null</span>) {</a></span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;2403</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;                remainingMonitors = <span class="keyword">new</span> ArrayList&lt;FieldMonitor&gt;();</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;2404</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;                remainingMonitorsMap.put(storageId, remainingMonitors);</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2405</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;            }</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;2406</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;            remainingMonitors.add(monitor);</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;2407</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;        }</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2408</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;2409</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        <span class="comment">// Invert references for each group of remaining monitors and recurse</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;2410</td>  <td class="nbHitsUncovered"><a title="Line 2410: Conditional coverage 0% (0/2).">&nbsp;0</a></td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;<a title="Line 2410: Conditional coverage 0% (0/2).">        <span class="keyword">for</span> (Map.Entry&lt;Integer, ArrayList&lt;FieldMonitor&gt;&gt; entry : remainingMonitorsMap.entrySet()) {</a></span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;2411</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;            <span class="keyword">final</span> <span class="keyword">int</span> storageId = entry.getKey();</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2412</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;2413</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;            <span class="comment">// Gather all objects that refer to any object in our current "objects" set</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;2414</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;            <span class="keyword">final</span> ArrayList&lt;NavigableSet&lt;ObjId&gt;&gt; refsList = <span class="keyword">new</span> ArrayList&lt;&gt;();</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;2415</td>  <td class="nbHitsUncovered"><a title="Line 2415: Conditional coverage 0% (0/2).">&nbsp;0</a></td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;<a title="Line 2415: Conditional coverage 0% (0/2).">            <span class="keyword">for</span> (ObjId object : objects) {</a></span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;2416</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;                <span class="keyword">final</span> NavigableSet&lt;ObjId&gt; refs = <span class="keyword">this</span>.queryReferences(storageId).get(object);</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;2417</td>  <td class="nbHitsUncovered"><a title="Line 2417: Conditional coverage 0% (0/2).">&nbsp;0</a></td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;<a title="Line 2417: Conditional coverage 0% (0/2).">                <span class="keyword">if</span> (refs != <span class="keyword">null</span>)</a></span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;2418</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;                    refsList.add(refs);</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;2419</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;            }</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2420</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;2421</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;            <span class="comment">// Recurse on the union of those objects</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;2422</td>  <td class="nbHitsUncovered"><a title="Line 2422: Conditional coverage 0% (0/2).">&nbsp;0</a></td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;<a title="Line 2422: Conditional coverage 0% (0/2).">            <span class="keyword">if</span> (!refsList.isEmpty())</a></span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;2423</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;                <span class="keyword">this</span>.notifyFieldMonitors(notifier, NavigableSets.union(refsList), entry.getValue(), step + 1);</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;2424</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;        }</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;2425</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;    }</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2426</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;2427</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">// Reference Path Queries</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2428</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;2429</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="comment">/**</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2430</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * Find all objects that refer to any object in the given target set through the specified path of references.</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2431</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2432</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @param path path of one or more reference fields (represented by storage IDs) through which to reach the target objects</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2433</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @param targetObjects target objects</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2434</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @return set of objects that refer to the {@code targetObjects} via {@code path}</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2435</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @throws UnknownFieldException if {@code path} contains a storage ID that does not correspond to a {@link ReferenceField}</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2436</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @throws IllegalArgumentException if {@code targetObjects} or {@code path} is null</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2437</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @throws IllegalArgumentException if {@code path} is empty</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2438</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @throws StaleTransactionException if this transaction is no longer usable</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2439</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     */</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2440</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="keyword">public</span> NavigableSet&lt;ObjId&gt; invertReferencePath(<span class="keyword">int</span>[] path, Iterable&lt;ObjId&gt; targetObjects) {</pre></td></tr>
<tr>  <td class="numLine">&nbsp;2441</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;2442</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        <span class="comment">// Sanity check</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;2443</td>  <td class="nbHitsUncovered"><a title="Line 2443: Conditional coverage 0% (0/2).">&nbsp;0</a></td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;<a title="Line 2443: Conditional coverage 0% (0/2).">        <span class="keyword">if</span> (targetObjects == <span class="keyword">null</span>)</a></span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;2444</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;            <span class="keyword">throw</span> <span class="keyword">new</span> IllegalArgumentException(<span class="string">"null targetObjects"</span>);</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;2445</td>  <td class="nbHitsUncovered"><a title="Line 2445: Conditional coverage 0% (0/2).">&nbsp;0</a></td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;<a title="Line 2445: Conditional coverage 0% (0/2).">        <span class="keyword">if</span> (path == <span class="keyword">null</span>)</a></span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;2446</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;            <span class="keyword">throw</span> <span class="keyword">new</span> IllegalArgumentException(<span class="string">"null path"</span>);</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;2447</td>  <td class="nbHitsUncovered"><a title="Line 2447: Conditional coverage 0% (0/2).">&nbsp;0</a></td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;<a title="Line 2447: Conditional coverage 0% (0/2).">        <span class="keyword">if</span> (path.length == 0)</a></span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;2448</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;            <span class="keyword">throw</span> <span class="keyword">new</span> IllegalArgumentException(<span class="string">"empty path"</span>);</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2449</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;2450</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        <span class="comment">// Verify all fields in the path are reference fields</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;2451</td>  <td class="nbHitsUncovered"><a title="Line 2451: Conditional coverage 0% (0/2).">&nbsp;0</a></td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;<a title="Line 2451: Conditional coverage 0% (0/2).">        <span class="keyword">for</span> (<span class="keyword">int</span> storageId : path)</a></span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;2452</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;            <span class="keyword">this</span>.schemas.verifyStorageInfo(storageId, ReferenceFieldStorageInfo.<span class="keyword">class</span>);</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2453</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;2454</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        <span class="comment">// Invert references in reverse order</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;2455</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;        NavigableSet&lt;ObjId&gt; result = <span class="keyword">null</span>;</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;2456</td>  <td class="nbHitsUncovered"><a title="Line 2456: Conditional coverage 0% (0/2).">&nbsp;0</a></td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;<a title="Line 2456: Conditional coverage 0% (0/2).">        <span class="keyword">for</span> (<span class="keyword">int</span> i = path.length - 1; i &gt;= 0; i--) {</a></span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;2457</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;            <span class="keyword">final</span> <span class="keyword">int</span> storageId = path[i];</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2458</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;2459</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;            <span class="comment">// Gather all objects that refer to any object in our current target objects set</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;2460</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;            <span class="keyword">final</span> ArrayList&lt;NavigableSet&lt;ObjId&gt;&gt; refsList = <span class="keyword">new</span> ArrayList&lt;&gt;();</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;2461</td>  <td class="nbHitsUncovered"><a title="Line 2461: Conditional coverage 0% (0/2).">&nbsp;0</a></td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;<a title="Line 2461: Conditional coverage 0% (0/2).">            <span class="keyword">for</span> (ObjId id : targetObjects) {</a></span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;2462</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;                <span class="keyword">final</span> NavigableSet&lt;ObjId&gt; refs = <span class="keyword">this</span>.queryReferences(storageId).get(id);</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;2463</td>  <td class="nbHitsUncovered"><a title="Line 2463: Conditional coverage 0% (0/2).">&nbsp;0</a></td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;<a title="Line 2463: Conditional coverage 0% (0/2).">                <span class="keyword">if</span> (refs != <span class="keyword">null</span>)</a></span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;2464</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;                    refsList.add(refs);</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;2465</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;            }</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;2466</td>  <td class="nbHitsUncovered"><a title="Line 2466: Conditional coverage 0% (0/2).">&nbsp;0</a></td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;<a title="Line 2466: Conditional coverage 0% (0/2).">            <span class="keyword">if</span> (refsList.isEmpty())</a></span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;2467</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;                <span class="keyword">return</span> NavigableSets.empty();</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2468</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;2469</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;            <span class="comment">// Recurse on the union of those objects</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;2470</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;            targetObjects = result = NavigableSets.union(refsList);</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2471</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        }</pre></td></tr>
<tr>  <td class="numLine">&nbsp;2472</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;2473</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        <span class="comment">// Done</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;2474</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;        <span class="keyword">return</span> result;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2475</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    }</pre></td></tr>
<tr>  <td class="numLine">&nbsp;2476</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;2477</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">// Index Queries</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2478</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;2479</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="comment">/**</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2480</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * Find all values stored in the specified {@link SimpleField} and, for each value,</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2481</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * the set of all objects having that value in the field.</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2482</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2483</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * &lt;p&gt;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2484</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * The {@code storageId} may refer to any {@link SimpleField}, whether part of an object or a sub-field</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2485</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * of a {@link ComplexField}.</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2486</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * &lt;/p&gt;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2487</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2488</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * &lt;p&gt;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2489</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * The returned index contains objects from all recorded schema versions for which the field is indexed;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2490</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * this method does not check whether any such schema versions exist.</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2491</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * &lt;/p&gt;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2492</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2493</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * &lt;p&gt;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2494</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * Only objects having schema versions in which the field is indexed will be found;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2495</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * this method does not check whether any such schema versions exist.</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2496</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * &lt;/p&gt;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2497</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2498</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @param storageId {@link SimpleField}'s storage ID</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2499</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @return read-only, real-time view of field values mapped to sets of objects with the value in the field</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2500</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @throws UnknownFieldException if no {@link SimpleField} corresponding to {@code storageId} exists</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2501</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @throws StaleTransactionException if this transaction is no longer usable</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2502</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     */</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2503</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="keyword">public</span> <span class="keyword">synchronized</span> CoreIndex&lt;?, ObjId&gt; queryIndex(<span class="keyword">int</span> storageId) {</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;2504</td>  <td class="nbHitsUncovered"><a title="Line 2504: Conditional coverage 0% (0/2).">&nbsp;0</a></td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;<a title="Line 2504: Conditional coverage 0% (0/2).">        <span class="keyword">if</span> (<span class="keyword">this</span>.stale)</a></span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;2505</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;            <span class="keyword">throw</span> <span class="keyword">new</span> StaleTransactionException(<span class="keyword">this</span>);</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;2506</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;        <span class="keyword">final</span> SimpleFieldStorageInfo&lt;?&gt; fieldInfo = <span class="keyword">this</span>.schemas.verifyStorageInfo(storageId, SimpleFieldStorageInfo.<span class="keyword">class</span>);</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;2507</td>  <td class="nbHitsUncovered"><a title="Line 2507: Conditional coverage 0% (0/2).">&nbsp;0</a></td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;<a title="Line 2507: Conditional coverage 0% (0/2).">        <span class="keyword">if</span> (fieldInfo.superFieldStorageId == 0)</a></span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;2508</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;            <span class="keyword">return</span> fieldInfo.getSimpleFieldIndex(<span class="keyword">this</span>);</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;2509</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;        <span class="keyword">final</span> ComplexFieldStorageInfo&lt;?&gt; superFieldInfo</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2510</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;          = <span class="keyword">this</span>.schemas.verifyStorageInfo(fieldInfo.superFieldStorageId, ComplexFieldStorageInfo.<span class="keyword">class</span>);</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;2511</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;        <span class="keyword">return</span> superFieldInfo.getSimpleSubFieldIndex(<span class="keyword">this</span>, fieldInfo);</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2512</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    }</pre></td></tr>
<tr>  <td class="numLine">&nbsp;2513</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;2514</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="comment">/**</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2515</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * Find all values stored as an element in the specified {@link ListField} and, for each such value,</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2516</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * the set of all objects having that value as an element in the list and the corresponding list index.</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2517</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2518</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * &lt;p&gt;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2519</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * The returned index contains objects from all recorded schema versions for which the list element field is indexed;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2520</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * this method does not check whether any such schema versions exist.</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2521</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * &lt;/p&gt;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2522</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2523</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @param storageId {@link ListField}'s storage ID</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2524</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @return read-only, real-time view of list element values, objects with the value in the list, and corresponding indicies</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2525</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @throws UnknownFieldException if no {@link ListField} corresponding to {@code storageId} exists</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2526</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @throws StaleTransactionException if this transaction is no longer usable</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2527</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     */</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2528</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="keyword">public</span> <span class="keyword">synchronized</span> CoreIndex2&lt;?, ObjId, Integer&gt; queryListElementIndex(<span class="keyword">int</span> storageId) {</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;2529</td>  <td class="nbHitsUncovered"><a title="Line 2529: Conditional coverage 0% (0/2).">&nbsp;0</a></td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;<a title="Line 2529: Conditional coverage 0% (0/2).">        <span class="keyword">if</span> (<span class="keyword">this</span>.stale)</a></span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;2530</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;            <span class="keyword">throw</span> <span class="keyword">new</span> StaleTransactionException(<span class="keyword">this</span>);</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;2531</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;        <span class="keyword">final</span> ListFieldStorageInfo&lt;?&gt; fieldInfo = <span class="keyword">this</span>.schemas.verifyStorageInfo(storageId, ListFieldStorageInfo.<span class="keyword">class</span>);</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;2532</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;        <span class="keyword">return</span> fieldInfo.getElementFieldIndex(<span class="keyword">this</span>);</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2533</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    }</pre></td></tr>
<tr>  <td class="numLine">&nbsp;2534</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;2535</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="comment">/**</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2536</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * Find all values stored as a value in the specified {@link MapField} and, for each such value,</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2537</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * the set of all objects having that value as a value in the map and the corresponding key.</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2538</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2539</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * &lt;p&gt;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2540</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * The returned index contains objects from all recorded schema versions for which the map value field is indexed;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2541</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * this method does not check whether any such schema versions exist.</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2542</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * &lt;/p&gt;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2543</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2544</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @param storageId {@link MapField}'s storage ID</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2545</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @return read-only, real-time view of map values, objects with the value in the map, and corresponding keys</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2546</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @throws UnknownFieldException if no {@link MapField} corresponding to {@code storageId} exists</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2547</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @throws StaleTransactionException if this transaction is no longer usable</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2548</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     */</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2549</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="keyword">public</span> <span class="keyword">synchronized</span> CoreIndex2&lt;?, ObjId, ?&gt; queryMapValueIndex(<span class="keyword">int</span> storageId) {</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;2550</td>  <td class="nbHitsUncovered"><a title="Line 2550: Conditional coverage 0% (0/2).">&nbsp;0</a></td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;<a title="Line 2550: Conditional coverage 0% (0/2).">        <span class="keyword">if</span> (<span class="keyword">this</span>.stale)</a></span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;2551</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;            <span class="keyword">throw</span> <span class="keyword">new</span> StaleTransactionException(<span class="keyword">this</span>);</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;2552</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;        <span class="keyword">final</span> MapFieldStorageInfo&lt;?, ?&gt; fieldInfo = <span class="keyword">this</span>.schemas.verifyStorageInfo(storageId, MapFieldStorageInfo.<span class="keyword">class</span>);</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;2553</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;        <span class="keyword">return</span> fieldInfo.getValueFieldIndex(<span class="keyword">this</span>);</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2554</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    }</pre></td></tr>
<tr>  <td class="numLine">&nbsp;2555</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;2556</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="comment">/**</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2557</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * Access a composite index on two fields.</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2558</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2559</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * &lt;p&gt;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2560</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * The returned index contains objects from all recorded schema versions in which the composite index is defined.</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2561</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * &lt;/p&gt;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2562</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2563</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @param storageId composite index's storage ID</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2564</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @return read-only, real-time view of the fields' values and the objects having those values in the fields</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2565</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @throws UnknownIndexException if {@code storageID} is unknown or does not correspond to a composite index on two fields</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2566</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @throws StaleTransactionException if this transaction is no longer usable</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2567</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     */</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2568</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    @SuppressWarnings(<span class="string">"unchecked"</span>)</pre></td></tr>
<tr>  <td class="numLine">&nbsp;2569</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="keyword">public</span> CoreIndex2&lt;?, ?, ObjId&gt; queryCompositeIndex2(<span class="keyword">int</span> storageId) {</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;2570</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;        <span class="keyword">final</span> CompositeIndexStorageInfo indexInfo = <span class="keyword">this</span>.schemas.verifyStorageInfo(storageId, CompositeIndexStorageInfo.<span class="keyword">class</span>);</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;2571</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;        <span class="keyword">final</span> Object index = indexInfo.getIndex(<span class="keyword">this</span>);</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;2572</td>  <td class="nbHitsUncovered"><a title="Line 2572: Conditional coverage 0% (0/2).">&nbsp;0</a></td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;<a title="Line 2572: Conditional coverage 0% (0/2).">        <span class="keyword">if</span> (!(index <span class="keyword">instanceof</span> CoreIndex2)) {</a></span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;2573</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;            <span class="keyword">throw</span> <span class="keyword">new</span> UnknownIndexException(storageId, <span class="string">"the composite index with storage ID "</span> + storageId</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2574</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;              + <span class="string">" is on "</span> + indexInfo.fields.size() + <span class="string">" != 2 fields"</span>);</pre></td></tr>
<tr>  <td class="numLine">&nbsp;2575</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        }</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;2576</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;        <span class="keyword">return</span> (CoreIndex2&lt;?, ?, ObjId&gt;)index;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2577</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    }</pre></td></tr>
<tr>  <td class="numLine">&nbsp;2578</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;2579</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="comment">/**</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2580</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * Access a composite index on three fields.</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2581</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2582</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * &lt;p&gt;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2583</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * The returned index contains objects from all recorded schema versions in which the composite index is defined.</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2584</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * &lt;/p&gt;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2585</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2586</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @param storageId composite index's storage ID</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2587</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @return read-only, real-time view of the fields' values and the objects having those values in the fields</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2588</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @throws UnknownIndexException if {@code storageID} is unknown or does not correspond to a composite index on two fields</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2589</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @throws StaleTransactionException if this transaction is no longer usable</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2590</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     */</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2591</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    @SuppressWarnings(<span class="string">"unchecked"</span>)</pre></td></tr>
<tr>  <td class="numLine">&nbsp;2592</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="keyword">public</span> CoreIndex3&lt;?, ?, ?, ObjId&gt; queryCompositeIndex3(<span class="keyword">int</span> storageId) {</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;2593</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;        <span class="keyword">final</span> CompositeIndexStorageInfo indexInfo = <span class="keyword">this</span>.schemas.verifyStorageInfo(storageId, CompositeIndexStorageInfo.<span class="keyword">class</span>);</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;2594</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;        <span class="keyword">final</span> Object index = indexInfo.getIndex(<span class="keyword">this</span>);</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;2595</td>  <td class="nbHitsUncovered"><a title="Line 2595: Conditional coverage 0% (0/2).">&nbsp;0</a></td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;<a title="Line 2595: Conditional coverage 0% (0/2).">        <span class="keyword">if</span> (!(index <span class="keyword">instanceof</span> CoreIndex3)) {</a></span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;2596</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;            <span class="keyword">throw</span> <span class="keyword">new</span> UnknownIndexException(storageId, <span class="string">"the composite index with storage ID "</span> + storageId</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2597</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;              + <span class="string">" is on "</span> + indexInfo.fields.size() + <span class="string">" != 3 fields"</span>);</pre></td></tr>
<tr>  <td class="numLine">&nbsp;2598</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        }</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;2599</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;        <span class="keyword">return</span> (CoreIndex3&lt;?, ?, ?, ObjId&gt;)index;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2600</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    }</pre></td></tr>
<tr>  <td class="numLine">&nbsp;2601</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;2602</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="comment">/**</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2603</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * Access a composite index on four fields.</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2604</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2605</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * &lt;p&gt;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2606</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * The returned index contains objects from all recorded schema versions in which the composite index is defined.</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2607</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * &lt;/p&gt;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2608</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2609</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @param storageId composite index's storage ID</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2610</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @return read-only, real-time view of the fields' values and the objects having those values in the fields</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2611</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @throws UnknownIndexException if {@code storageID} is unknown or does not correspond to a composite index on two fields</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2612</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @throws StaleTransactionException if this transaction is no longer usable</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2613</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     */</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2614</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    @SuppressWarnings(<span class="string">"unchecked"</span>)</pre></td></tr>
<tr>  <td class="numLine">&nbsp;2615</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="keyword">public</span> CoreIndex4&lt;?, ?, ?, ?, ObjId&gt; queryCompositeIndex4(<span class="keyword">int</span> storageId) {</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;2616</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;        <span class="keyword">final</span> CompositeIndexStorageInfo indexInfo = <span class="keyword">this</span>.schemas.verifyStorageInfo(storageId, CompositeIndexStorageInfo.<span class="keyword">class</span>);</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;2617</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;        <span class="keyword">final</span> Object index = indexInfo.getIndex(<span class="keyword">this</span>);</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;2618</td>  <td class="nbHitsUncovered"><a title="Line 2618: Conditional coverage 0% (0/2).">&nbsp;0</a></td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;<a title="Line 2618: Conditional coverage 0% (0/2).">        <span class="keyword">if</span> (!(index <span class="keyword">instanceof</span> CoreIndex4)) {</a></span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;2619</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;            <span class="keyword">throw</span> <span class="keyword">new</span> UnknownIndexException(storageId, <span class="string">"the composite index with storage ID "</span> + storageId</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2620</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;              + <span class="string">" is on "</span> + indexInfo.fields.size() + <span class="string">" != 4 fields"</span>);</pre></td></tr>
<tr>  <td class="numLine">&nbsp;2621</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        }</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;2622</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;        <span class="keyword">return</span> (CoreIndex4&lt;?, ?, ?, ?, ObjId&gt;)index;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2623</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    }</pre></td></tr>
<tr>  <td class="numLine">&nbsp;2624</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;2625</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="comment">/**</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2626</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * Access any composite index by storage ID, regardless of the number of fields indexed.</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2627</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2628</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * &lt;p&gt;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2629</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * The returned index contains objects from all recorded schema versions in which the composite index is defined.</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2630</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * &lt;/p&gt;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2631</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2632</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @param storageId composite index's storage ID</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2633</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @return read-only, real-time view of the fields' values and the objects having those values in the fields</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2634</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @throws UnknownIndexException if {@code storageID} is unknown or does not correspond to a composite index</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2635</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @throws StaleTransactionException if this transaction is no longer usable</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2636</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     */</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2637</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="keyword">public</span> Object queryCompositeIndex(<span class="keyword">int</span> storageId) {</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;2638</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;        <span class="keyword">final</span> CompositeIndexStorageInfo indexInfo = <span class="keyword">this</span>.schemas.verifyStorageInfo(storageId, CompositeIndexStorageInfo.<span class="keyword">class</span>);</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;2639</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;        <span class="keyword">return</span> indexInfo.getIndex(<span class="keyword">this</span>);</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2640</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    }</pre></td></tr>
<tr>  <td class="numLine">&nbsp;2641</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;2642</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="comment">// Query an index on a reference field for referring objects</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2643</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    @SuppressWarnings(<span class="string">"unchecked"</span>)</pre></td></tr>
<tr>  <td class="numLine">&nbsp;2644</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="keyword">private</span> NavigableMap&lt;ObjId, NavigableSet&lt;ObjId&gt;&gt; queryReferences(<span class="keyword">int</span> storageId) {</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;2645</td>  <td class="nbHitsUncovered"><a title="Line 2645: Conditional coverage 0% (0/4) [each condition: 0%, 0%].">&nbsp;0</a></td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;<a title="Line 2645: Conditional coverage 0% (0/4) [each condition: 0%, 0%].">        <span class="keyword">assert</span> <span class="keyword">this</span>.schemas.verifyStorageInfo(storageId, ReferenceFieldStorageInfo.<span class="keyword">class</span>) != <span class="keyword">null</span>;</a></span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;2646</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;        <span class="keyword">return</span> (NavigableMap&lt;ObjId, NavigableSet&lt;ObjId&gt;&gt;)<span class="keyword">this</span>.queryIndex(storageId).asMap();</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2647</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    }</pre></td></tr>
<tr>  <td class="numLine">&nbsp;2648</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;2649</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="comment">/**</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2650</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * Find all objects that refer to the given target object through the/any reference field with the specified</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2651</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * {@link DeleteAction}.</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2652</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2653</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * &lt;p&gt;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2654</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * Because different schema versions can have different {@link DeleteAction}'s configured for the</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2655</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * same field, we have to iterate through each schema version separately.</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2656</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * &lt;/p&gt;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2657</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2658</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @param target referred-to object</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2659</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @param onDelete {@link DeleteAction} to match</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2660</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @param fieldStorageId reference field storage ID, or -1 to match any reference field</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2661</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     */</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2662</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="keyword">private</span> NavigableSet&lt;ObjId&gt; findReferrers(ObjId target, DeleteAction onDelete, <span class="keyword">int</span> fieldStorageId) {</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;2663</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;        <span class="keyword">final</span> ArrayList&lt;NavigableSet&lt;ObjId&gt;&gt; refSets = <span class="keyword">new</span> ArrayList&lt;&gt;();</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;2664</td>  <td class="nbHitsUncovered"><a title="Line 2664: Conditional coverage 0% (0/2).">&nbsp;0</a></td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;<a title="Line 2664: Conditional coverage 0% (0/2).">        <span class="keyword">for</span> (Schema schemaVersion : <span class="keyword">this</span>.schemas.versions.values()) {</a></span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2665</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;2666</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;            <span class="comment">// Check whether any object of this version exist; if not, skip</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;2667</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;            <span class="keyword">final</span> NavigableSet&lt;ObjId&gt; versionObjects = <span class="keyword">this</span>.queryVersion().asMap().get(schemaVersion.versionNumber);</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;2668</td>  <td class="nbHitsUncovered"><a title="Line 2668: Conditional coverage 0% (0/2).">&nbsp;0</a></td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;<a title="Line 2668: Conditional coverage 0% (0/2).">            <span class="keyword">if</span> (versionObjects == <span class="keyword">null</span>)</a></span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;2669</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;                <span class="keyword">continue</span>;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2670</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;2671</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;            <span class="comment">// Find all reference fields with storage ID matching fieldStorageId (if not -1) and check them.</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2672</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;            <span class="comment">// Do this separately for each such field in each object type because the fields may have different DeleteAction's.</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;2673</td>  <td class="nbHitsUncovered"><a title="Line 2673: Conditional coverage 0% (0/2).">&nbsp;0</a></td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;<a title="Line 2673: Conditional coverage 0% (0/2).">            <span class="keyword">for</span> (ObjType objType : schemaVersion.objTypeMap.values()) {</a></span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;2674</td>  <td class="nbHitsUncovered"><a title="Line 2674: Conditional coverage 0% (0/2).">&nbsp;0</a></td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;<a title="Line 2674: Conditional coverage 0% (0/2).">                <span class="keyword">for</span> (ReferenceField field : Iterables.filter(objType.getFieldsAndSubFields(), ReferenceField.<span class="keyword">class</span>)) {</a></span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2675</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;2676</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;                    <span class="comment">// Check delete action and field</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;2677</td>  <td class="nbHitsUncovered"><a title="Line 2677: Conditional coverage 0% (0/6) [each condition: 0%, 0%, 0%].">&nbsp;0</a></td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;<a title="Line 2677: Conditional coverage 0% (0/6) [each condition: 0%, 0%, 0%].">                    <span class="keyword">if</span> (field.onDelete != onDelete || (fieldStorageId != -1 &amp;&amp; field.storageId != fieldStorageId))</a></span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;2678</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;                        <span class="keyword">continue</span>;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2679</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;2680</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;                    <span class="comment">// Query index on this field, restricting to those only references coming from objType objects</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;2681</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;                    <span class="keyword">final</span> NavigableSet&lt;ObjId&gt; refs = <span class="keyword">this</span>.queryIndex(field.storageId)</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2682</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;                      .filter(1, <span class="keyword">new</span> KeyRanges(ObjId.getKeyRange(objType.storageId))).asMap().get(target);</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;2683</td>  <td class="nbHitsUncovered"><a title="Line 2683: Conditional coverage 0% (0/2).">&nbsp;0</a></td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;<a title="Line 2683: Conditional coverage 0% (0/2).">                    <span class="keyword">if</span> (refs == <span class="keyword">null</span>)</a></span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;2684</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;                        <span class="keyword">continue</span>;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2685</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;2686</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;                    <span class="comment">// Restrict further to the specific schema version</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;2687</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;                    refSets.add(NavigableSets.intersection(versionObjects, refs));</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;2688</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;                }</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;2689</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;            }</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;2690</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;        }</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;2691</td>  <td class="nbHitsUncovered"><a title="Line 2691: Conditional coverage 0% (0/2).">&nbsp;0</a></td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;<a title="Line 2691: Conditional coverage 0% (0/2).">        <span class="keyword">return</span> !refSets.isEmpty() ? NavigableSets.union(refSets) : NavigableSets.empty(FieldTypeRegistry.OBJ_ID);</a></span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2692</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    }</pre></td></tr>
<tr>  <td class="numLine">&nbsp;2693</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;2694</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="keyword">private</span> <span class="keyword">byte</span>[] buildCompositeIndexEntry(ObjId id, CompositeIndex index) {</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;2695</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;        <span class="keyword">return</span> Transaction.buildCompositeIndexEntry(<span class="keyword">this</span>, id, index);</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2696</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    }</pre></td></tr>
<tr>  <td class="numLine">&nbsp;2697</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;2698</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="keyword">private</span> <span class="keyword">static</span> <span class="keyword">byte</span>[] buildDefaultCompositeIndexEntry(ObjId id, CompositeIndex index) {</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;2699</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;        <span class="keyword">return</span> Transaction.buildCompositeIndexEntry(<span class="keyword">null</span>, id, index);</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2700</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    }</pre></td></tr>
<tr>  <td class="numLine">&nbsp;2701</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;2702</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="keyword">private</span> <span class="keyword">static</span> <span class="keyword">byte</span>[] buildCompositeIndexEntry(Transaction tx, ObjId id, CompositeIndex index) {</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;2703</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;        <span class="keyword">final</span> ByteWriter writer = <span class="keyword">new</span> ByteWriter();</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;2704</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;        UnsignedIntEncoder.write(writer, index.storageId);</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;2705</td>  <td class="nbHitsUncovered"><a title="Line 2705: Conditional coverage 0% (0/2).">&nbsp;0</a></td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;<a title="Line 2705: Conditional coverage 0% (0/2).">        <span class="keyword">for</span> (SimpleField&lt;?&gt; field : index.fields) {</a></span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;2706</td>  <td class="nbHitsUncovered"><a title="Line 2706: Conditional coverage 0% (0/2).">&nbsp;0</a></td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;<a title="Line 2706: Conditional coverage 0% (0/2).">            <span class="keyword">final</span> <span class="keyword">byte</span>[] value = tx != <span class="keyword">null</span> ? tx.kvt.get(field.buildKey(id)) : <span class="keyword">null</span>;</a></span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;2707</td>  <td class="nbHitsUncovered"><a title="Line 2707: Conditional coverage 0% (0/2).">&nbsp;0</a></td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;<a title="Line 2707: Conditional coverage 0% (0/2).">            writer.write(value != <span class="keyword">null</span> ? value : field.fieldType.getDefaultValue());</a></span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;2708</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;        }</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;2709</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;        id.writeTo(writer);</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;2710</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;        <span class="keyword">return</span> writer.getBytes();</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2711</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    }</pre></td></tr>
<tr>  <td class="numLine">&nbsp;2712</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;2713</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">// Mutation</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2714</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;2715</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="keyword">interface</span> Mutation&lt;V&gt; {</pre></td></tr>
<tr>  <td class="numLine">&nbsp;2716</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        V mutate();</pre></td></tr>
<tr>  <td class="numLine">&nbsp;2717</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    }</pre></td></tr>
<tr>  <td class="numLine">&nbsp;2718</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;2719</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">// SimpleFieldChangeNotifier</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2720</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;2721</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="keyword">private</span> <span class="keyword">abstract</span> <span class="keyword">class</span> SimpleFieldChangeNotifier <span class="keyword">implements</span> FieldChangeNotifier {</pre></td></tr>
<tr>  <td class="numLine">&nbsp;2722</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;2723</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        <span class="keyword">final</span> <span class="keyword">int</span> storageId;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;2724</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        <span class="keyword">final</span> ObjId id;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;2725</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;2726</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;        SimpleFieldChangeNotifier(SimpleField&lt;?&gt; field, ObjId id) {</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;2727</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;            <span class="keyword">this</span>.storageId = field.storageId;</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;2728</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;            <span class="keyword">this</span>.id = id;</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;2729</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;        }</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2730</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;2731</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        @Override</pre></td></tr>
<tr>  <td class="numLine">&nbsp;2732</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        <span class="keyword">public</span> <span class="keyword">int</span> getStorageId() {</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;2733</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;            <span class="keyword">return</span> <span class="keyword">this</span>.storageId;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2734</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        }</pre></td></tr>
<tr>  <td class="numLine">&nbsp;2735</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;2736</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        @Override</pre></td></tr>
<tr>  <td class="numLine">&nbsp;2737</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        <span class="keyword">public</span> ObjId getId() {</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;2738</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;            <span class="keyword">return</span> <span class="keyword">this</span>.id;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2739</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        }</pre></td></tr>
<tr>  <td class="numLine">&nbsp;2740</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;2741</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        @Override</pre></td></tr>
<tr>  <td class="numLine">&nbsp;2742</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        <span class="keyword">public</span> <span class="keyword">void</span> notify(Transaction tx, Object listener, <span class="keyword">int</span>[] path, NavigableSet&lt;ObjId&gt; referrers) {</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;2743</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;            <span class="keyword">this</span>.notify(tx, (SimpleFieldChangeListener)listener, path, referrers);</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;2744</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;        }</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2745</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;2746</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        <span class="keyword">abstract</span> <span class="keyword">void</span> notify(Transaction tx, SimpleFieldChangeListener listener, <span class="keyword">int</span>[] path, NavigableSet&lt;ObjId&gt; referrers);</pre></td></tr>
<tr>  <td class="numLine">&nbsp;2747</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    }</pre></td></tr>
<tr>  <td class="numLine">&nbsp;2748</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;2749</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">// Callback</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2750</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;2751</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="comment">/**</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2752</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * Callback interface for notification of transaction completion events.</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2753</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * Callbacks are registered with a transaction via {@link Transaction#addCallback Transaction.addCallback()},</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2754</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * and are executed in the order registered, in the same thread that just committed (or rolled back) the transaction.</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2755</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2756</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * &lt;p&gt;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2757</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * Modeled after Spring's {@link org.springframework.transaction.support.TransactionSynchronization} interface.</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2758</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * &lt;/p&gt;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2759</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2760</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @see Transaction#addCallback Transaction.addCallback()</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2761</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     */</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2762</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="keyword">public</span> <span class="keyword">interface</span> Callback {</pre></td></tr>
<tr>  <td class="numLine">&nbsp;2763</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;2764</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        <span class="comment">/**</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2765</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">         * Invoked before transaction commit (and before {@link #beforeCompletion}).</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2766</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">         * This method is invoked when a transaction is intended to be committed; it may however still be rolled back.</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2767</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">         *</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2768</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">         * &lt;p&gt;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2769</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">         * Any exceptions thrown will result in a transaction rollback and be propagated to the caller.</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2770</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">         * &lt;/p&gt;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2771</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">         *</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2772</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">         * @param readOnly true if the transaction {@linkplain Transaction#isReadOnly is marked read-only}</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2773</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">         */</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2774</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        <span class="keyword">void</span> beforeCommit(<span class="keyword">boolean</span> readOnly);</pre></td></tr>
<tr>  <td class="numLine">&nbsp;2775</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;2776</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        <span class="comment">/**</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2777</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">         * Invoked before transaction completion in any case (but after any {@link #beforeCommit beforeCommit()}).</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2778</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">         * This method is invoked whether the transaction is going to be committed or rolled back,</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2779</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">         * and is invoked even if {@link #beforeCommit beforeCommit()} throws an exception.</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2780</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">         * Typically used to clean up resources before transaction completion.</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2781</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">         *</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2782</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">         * &lt;p&gt;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2783</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">         * Any exceptions thrown will be logged but will &lt;b&gt;not&lt;/b&gt; propagate to the caller.</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2784</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">         * &lt;/p&gt;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2785</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">         */</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2786</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        <span class="keyword">void</span> beforeCompletion();</pre></td></tr>
<tr>  <td class="numLine">&nbsp;2787</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;2788</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        <span class="comment">/**</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2789</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">         * Invoked after successful transaction commit (and before {@link #afterCompletion afterCompletion()}).</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2790</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">         *</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2791</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">         * &lt;p&gt;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2792</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">         * Any exceptions thrown will propagate to the caller.</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2793</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">         * &lt;/p&gt;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2794</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">         */</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2795</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        <span class="keyword">void</span> afterCommit();</pre></td></tr>
<tr>  <td class="numLine">&nbsp;2796</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;2797</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        <span class="comment">/**</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2798</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">         * Invoked after transaction completion (but after any {@link #afterCommit}).</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2799</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">         * This method is invoked in any case, whether the transaction was committed or rolled back.</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2800</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">         * Typically used to clean up resources after transaction completion.</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2801</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">         *</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2802</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">         * &lt;p&gt;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2803</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">         * Any exceptions thrown will be logged but will &lt;b&gt;not&lt;/b&gt; propagate to the caller.</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2804</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">         * &lt;/p&gt;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2805</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">         *</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2806</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">         * @param committed true if transaction was commited, false if transaction was rolled back</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2807</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">         */</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2808</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        <span class="keyword">void</span> afterCompletion(<span class="keyword">boolean</span> committed);</pre></td></tr>
<tr>  <td class="numLine">&nbsp;2809</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    }</pre></td></tr>
<tr>  <td class="numLine">&nbsp;2810</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;2811</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="comment">/**</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2812</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * Adapter class for {@link Callback}.</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2813</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2814</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * &lt;p&gt;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2815</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * All the implementations in this class do nothing.</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2816</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * &lt;/p&gt;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2817</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     */</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;2818</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;    <span class="keyword">public</span> <span class="keyword">static</span> <span class="keyword">class</span> CallbackAdapter <span class="keyword">implements</span> Callback {</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2819</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;2820</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        @Override</pre></td></tr>
<tr>  <td class="numLine">&nbsp;2821</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        <span class="keyword">public</span> <span class="keyword">void</span> beforeCommit(<span class="keyword">boolean</span> readOnly) {</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;2822</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;        }</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2823</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;2824</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        @Override</pre></td></tr>
<tr>  <td class="numLine">&nbsp;2825</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        <span class="keyword">public</span> <span class="keyword">void</span> beforeCompletion() {</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;2826</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;        }</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2827</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;2828</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        @Override</pre></td></tr>
<tr>  <td class="numLine">&nbsp;2829</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        <span class="keyword">public</span> <span class="keyword">void</span> afterCommit() {</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;2830</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;        }</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2831</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;2832</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        @Override</pre></td></tr>
<tr>  <td class="numLine">&nbsp;2833</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        <span class="keyword">public</span> <span class="keyword">void</span> afterCompletion(<span class="keyword">boolean</span> committed) {</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;2834</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;        }</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2835</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    }</pre></td></tr>
<tr>  <td class="numLine">&nbsp;2836</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;2837</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">// Predicates &amp; Functions</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2838</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;2839</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="comment">// Matches FieldMonitors who monitor the specified field in the specified object type</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;2840</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;    <span class="keyword">private</span> <span class="keyword">final</span> <span class="keyword">class</span> MonitoredPredicate <span class="keyword">implements</span> Predicate&lt;FieldMonitor&gt; {</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2841</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;2842</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        <span class="keyword">private</span> <span class="keyword">final</span> ObjId id;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;2843</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        <span class="keyword">private</span> <span class="keyword">final</span> <span class="keyword">int</span> storageId;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;2844</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;2845</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;        MonitoredPredicate(ObjId id, <span class="keyword">int</span> storageId) {</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;2846</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;            <span class="keyword">this</span>.id = id;</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;2847</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;            <span class="keyword">this</span>.storageId = storageId;</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;2848</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;        }</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2849</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;2850</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        @Override</pre></td></tr>
<tr>  <td class="numLine">&nbsp;2851</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        <span class="keyword">public</span> <span class="keyword">boolean</span> apply(FieldMonitor monitor) {</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;2852</td>  <td class="nbHitsUncovered"><a title="Line 2852: Conditional coverage 0% (0/6) [each condition: 0%, 0%, 0%].">&nbsp;0</a></td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;<a title="Line 2852: Conditional coverage 0% (0/6) [each condition: 0%, 0%, 0%].">            <span class="keyword">return</span> monitor.storageId == <span class="keyword">this</span>.storageId &amp;&amp; (monitor.types == <span class="keyword">null</span> || monitor.types.contains(<span class="keyword">this</span>.id.getBytes()));</a></span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2853</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        }</pre></td></tr>
<tr>  <td class="numLine">&nbsp;2854</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    }</pre></td></tr>
<tr>  <td class="numLine">&nbsp;2855</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;2856</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="comment">// Matches ReferenceFields that have cascadeDelete = true</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;2857</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;    <span class="keyword">private</span> <span class="keyword">final</span> <span class="keyword">class</span> HasCascadeDelete <span class="keyword">implements</span> Predicate&lt;ReferenceField&gt; {</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2858</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;2859</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        @Override</pre></td></tr>
<tr>  <td class="numLine">&nbsp;2860</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        <span class="keyword">public</span> <span class="keyword">boolean</span> apply(ReferenceField field) {</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;2861</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;            <span class="keyword">return</span> field.cascadeDelete;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2862</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        }</pre></td></tr>
<tr>  <td class="numLine">&nbsp;2863</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    }</pre></td></tr>
<tr>  <td class="numLine">&nbsp;2864</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;}</pre></td></tr>
<tr>  <td class="numLine">&nbsp;2865</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
</table>

<div class="footer">Report generated by <a href="http://cobertura.sourceforge.net/" target="_top">Cobertura</a> 2.0.3 on 5/28/15 8:10 PM.</div>
</body>
</html>
